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!

Conditionally supress an object 2

Status
Not open for further replies.

cantona

Technical User
May 20, 2001
121
GB
HELP!!

I am working on a report, where i need to flag up certain information to the users. I would like to do this by using a warning bitmap image, which appears next to the record, where certain criteria is met. For example the graphic will appear where the count of sales for a particular person is greater than or equal to 3, otherwise the graphic should be supressed.
Im very new to this sort of thing, is there any way that this can be done using vba?
Ive tried looking at the visible property, but have had no luck

can anyone help?

 
You have to set the properties in the 'Format()' event for the section you have the picture in. This example sets an Image to visible if the criteria is met:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
  If Me.Total > 1000 Then
    Me.Image1.Visible = True
  Else
    Me.Image1.Visible = False
  End If
End Sub
VBSlammer
redinvader3walking.gif

Unemployed in Houston, Texas
 
VBSlammer,
Thank you very much, ive tried your suggestion and it works perfectly !!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top