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

Access - need to hide date field &show text field

Status
Not open for further replies.

shankbanta

Technical User
Apr 15, 2003
43
US
Does anyone know how to hide a date field and show a text field in a report. What I am trying to do - If there is not a date in the field, show N/A. Not able to hide the date field in the report.
 
I'll assume your field on the report is bound to a table field with data type date/time. You can, in design view, place a label box on top of this field with the visible property set to No. Then, let's say on the event OnOpen, place VBA code to text for a blank date field. If it is blank, then set the label to visible (eg. [labelname].visible = true]) and caption set to N/A (eg. [labelname].caption = "N/A"). Also set the text box for the date to False (eg. [textboxname].visible = false)

Or instead of a label use a textbox, but you get the idea.

Neil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top