Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    280
    Thanks
    0
    Thanked 0 Times in 0 Posts

    text in details section (Access 2000)

    I have a report with a control named status.Some universities do no fill this control and others do.Can i have an unbinded control on the report in a tabular view,to show the folllowing texts:
    If IsNot Nill(Me!status) Then
    Me!description.txt = " Fundamental"
    Else
    Me!description.txt = "Medical"
    End If
    i got it wrong,and also i am not sure how can we write text in details section

  2. #2
    Lounger
    Join Date
    Oct 2001
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: text in details section (Access 2000)

    Put this within the control section of your unbound text box.

    =IIf(IsNull([Status]),"Fundamental"," Medical")

  3. #3
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    280
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: text in details section (Access 2000)

    Thank you so much.It is OK now. When I wanted to apply your method to a Select Case in the OnOpen event of the report, I got the message that Access does not support this action.I wanted to populate the unbounded control called

  4. #4
    Lounger
    Join Date
    Oct 2001
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: text in details section (Access 2000)

    Reports in access are based upon information contained within your tables, and is retrieved from the tables itself, queries or SQL, not from forms. The same is true of forms. You can't use one to populate the other and visa versa.

    If the information you are trying to obtain is from an option group with a number of values, then the best way to approach this is by setting it up within your query for the report. In the next empty column, put the following:

    txtAction: IIf([target]="1","Allowed","Disallowed")

    This is assuming that "Allowed" is set up as Option and as an example I have used a second option of "Disallowed" if this is set up as option 2.

    I hope this is what you are looking for.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: text in details section (Access 2000)

    A text box doesn't have a Row Source property - that is for list boxes and combo boxes. You want to set the Value property.

  6. #6
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    280
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: text in details section (Access 2000)

    Thank you Swan and Hans.To explain what i want to do.First i used with success the suggestion of Swan.Second, i want to have another unbound control in the details section with text depending on the option group of 8 options in the form.What i have done up to now does not work :
    Private Sub Report_Open(Cancel As Integer)
    ............
    Case 1
    Me!TxtAction.Value = " ssss"
    Case 2
    Me!TxtAction.Value = "r sss"
    Case 2
    End Select

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: text in details section (Access 2000)

    Since the text box is in the Detail section, you must put the code in the On Format event of the detail section, not in the On Open event of the report.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •