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

Showing an object in a report

Status
Not open for further replies.

dunner44

MIS
Jul 27, 2004
32
US
In my report, if the value of a field is 50, then Picture1 shows, if the value is 100, then Picture2 shows, etc. But the .Value doesn't work in the VB code.

The code I tried is...
If Me.FIELD.Value = 50 Then
Me.Pic_1.Visible = True
Me.Pic_2.Visible = False
Elseif Me.FIELD.Value = 100 Then
Me.Pic_1.Visible = False
Me.Pic_2.Visible = True
Else
Me.Pic_3.Visible - True
End If

I keep getting an error that doesn't recognize the .Value option. Any suggestions?

TIA



 
Which type of control is FIELD ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Have you tried dropping the .Value ?

If Me.FIELD = 50 Then


Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top