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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cahnge Graphic in report according to boolean value?

Status
Not open for further replies.

bluedollar

Programmer
Jul 24, 2003
174
GB
I have report with boolean value fields in it. What I want to do is to have a tick.jpg and cross.jpg and display the corresponding picture determined on whether the boolean value is true or false.

Is this possible, I am using access 2000.

Any help would be greatly appreciated.

Thanks

Dan
 
It might be easiest to add both images one on top of the other. Make one of them invisible based on the value of the boolean field.

In the On Format event of the section containing the boolean value and the images...

If Me.chkIsChecked = True Then
Me.imgTick.Visible = True
Me.imgCross.Visible = False
Else
Me.imgTick.Visible = False
Me.imgCross.Visible = True
End If

Slightly more compact code would be:
Me.imgTick.Visible = Me.chkIsChecked = True
Me.imgCross.Visible = Me.chkIsChecked = False



Duane
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top