How do I suppress blank lines in reports

  • Thread starter Thread starter R P S
  • Start date Start date
R

R P S

I am preparing an address book wherein some fields are blank. while printing
reports, blank spaces are left making the report more bulky and untidy.

I want that the report should not print the blank values and also the labels
attached to these fields if the fields are below e.g. say Office Phone 2
field is free for some record. I want that while printing this line should
not print and also the label 'Office Phone 2" is not printed in the report
and the blank space is used by the next available filled up field.

Thanks
 
R P S said:
I am preparing an address book wherein some fields are blank. while printing
reports, blank spaces are left making the report more bulky and untidy.

I want that the report should not print the blank values and also the labels
attached to these fields if the fields are below e.g. say Office Phone 2
field is free for some record. I want that while printing this line should
not print and also the label 'Office Phone 2" is not printed in the report
and the blank space is used by the next available filled up field.

Assuming you have the usual arrangement with the labels
attached to and in the same horizontal "row" of their
respective address text box. Then, for each textbox in the
address that might be empty, add a line of VBA code to the
Format event procedure of the (detail?) section that
contains the address text boxes:

Me.textbox.Visible = Not IsNull(Me.textbox)

And set the section's and each text box's CanShrink property
to Yes.
 
Back
Top