Struggling with reports/VBA

  • Thread starter Thread starter sanf0rd
  • Start date Start date
S

sanf0rd

Guest
Hi all,

I cannot seem to make this work correctly...
I have a table with a Yes/No field, let's say it is named "Enabled"

In a report generated by access, I get the values from the database in textboxes so it reads:

Enabled: Yes
OR
Enabled: No

I'm trying to change the text in the reports based on the value of this field.
Basically, if Enabled = "Yes", then change a label on the report to "This is enabled". I want to customize the way the report uses the information, not take it directly from the DB. How can I do this?
 
Try some thing like this (It works in a form)

If Yourfieldvalue = "No Then
Yourlabel.Caption = "Disabled"
else
Yourlabel.Caption = "Enabled"
End If
 
Can anyone help with this? None of the code that I use when coding forms is available when coding reports.

I'm trying to show / hide a text box dependent on a Yes/no box that is entered in a form but .enabled isn't there nor is .value.

Is there anyway to do this?
 

Users who are viewing this thread

Back
Top Bottom