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

How to not show Blank Fields on Report

Status
Not open for further replies.

ksgirl2

Programmer
Jul 19, 2002
45
US
Hello,

I have an access report that prints several different fields that may or maynot be filled. I would like to "sinch" the report by NOT displaying the empty fields. I want it to print out only the fields that have information and have the rest left off. Is this something that is feasible?

Thanks in Advance!

marie
 
You could use the TRIM function on those fields that may be blank. This function eliminates blank character spaces at the beginning or end of a field. If the whole field is blank, the field is not displayed. However, the effectiveness of this technique will depend a lot on how your report is laid out. If you are using a columnar layout, the whole field will disappear and there will be no blank line. If you are using a datasheet layout, the field will simply be blank.

Set the control source for the field to =Trim([ControlName]).

HTH
Lightning
 
Well I'm still not getting this to work. I set the control sources to things like =TRIM([allergies]) but it comes up with an error. I'm not sure if I'm putting the TRIM command in the correct spot or if there is a missing part to this trick. Thanks for the help!

marie
 
Check your references. I have the following references checkd for the particular application that uses this function:

Visual Basic for Applications
Microsoft Access 10 Object Library
Microsoft DAO 3.6 Object Library
OLE Automation
Microsoft Visual Basic for Applications Extensibility 5.3

HTH
Lightning
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top