Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hiding a label on a report based on yes/no value from a form

Status
Not open for further replies.

tobymom

Programmer
Aug 18, 2006
36
US
I thought this was going to be easy but...

so I have a form with this checkbox named "A", source..let's say A.

Now, let's say there's a report with a label captioned as "A" (name is "LabelA")

I want "A" to show up in the report when checkbox "A" is checked. (meaning value is true on a table)

I tried to use something like this but getting this error: "microsoft access can't find the field "A" referred to in your expression"

I put this on the report's "On active" event:

if me.A is True then
LabelA.visible = true
else
LabelA.visible = false
end if

the report's source table is the same table as the form...
 
I figured it out...

Somehow, I had to bring in the value to the report as "Invisible", then refer that report field on IF_THEN.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top