Making images visible depending on result

monplankton

Registered User.
Local time
Today, 04:01
Joined
Sep 14, 2011
Messages
83
Hi, I'm using 2003 and I have a report that currently has 3 images appearing depending if you tick a box on a form or not. What I'm looking to do is have it appear depending on the result of the querie for example.

I have 3 images titled A, B and OB. If A is in the querie A appears, B in the querie B appears, same for C.

The code I have at the moment is:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
  Me![A].Visible = Me![ImportantA]
  Me![B].Visible = Me![ImportantB]
  Me![OB].Visible = Me![OBD]

I thought I could just change it to an if statement but I'm not sure how it would be written, any help much appreciated.
 
Hi, I'm using 2003 and I have a report that currently has 3 images appearing depending if you tick a box on a form or not. What I'm looking to do is have it appear depending on the result of the querie for example.

I have 3 images titled A, B and OB. If A is in the querie A appears, B in the querie B appears, same for C.

The code I have at the moment is:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
  Me![A].Visible = Me![ImportantA]
  Me![B].Visible = Me![ImportantB]
  Me![OB].Visible = Me![OBD]

I thought I could just change it to an if statement but I'm not sure how it would be written, any help much appreciated.

why not just put some code in the afterupdate of the checkbox? I wouldn't even be in the detail_format event for something like this.
 

Users who are viewing this thread

Back
Top Bottom