Where To Place Conditonal Code

  • Thread starter Thread starter Radar
  • Start date Start date
R

Radar

I have a rpt. that prints out orders for picking.
In the page header I have an image with the word "Overnight"
Which I have visible = False
My question
1) Where do I put the code to Change Visible = True, Based on
Preferedship field

I typed this code

If me.Preferedship = "Dhl-Overnight" Then
Me.image58.Visible = True
Else
Me.image58.Visible = False
end If

I place in the format event, but the visible option was not an option

Thanks
Radar
 
The code should be in the On Format event of the section of the report
containing the image control.

Also, consider changing the name from image58 to something like
"imgOvernight".
Try code like:
Me.imgOvernight.Visible = Me.Preferedship = "Dhl-Overnight"

Visible is always an option with all controls even if it doesn't show in
intellisense.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top