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.
 
Back
Top