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!

Print field on condition only 1

Status
Not open for further replies.

robinsql

Programmer
Aug 2, 2002
236
IE
Hi,

I have a field called Time on my report which I only want to print should the time on each record be greater than 9:00.
How do I do this?
Thanks for any help,

Robin
 
Hi

Assuming the control to be printed is in the Detail section, put code like so in teh OnFormat event of the Detail section of the report

If timTime > #09:00# Then
timTime.Visible = true
Else
timTime.Visible = False
End If

Note I have not used Time as the control name, Time is a reserved word in Access and it is not a good idea to use reserved words as control names




Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top