How do I suppress blank lines in reports

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
 
M

Marshall Barton

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top