Skip blank text boxes in report

davids

New member
Local time
Today, 06:26
Joined
Oct 5, 2001
Messages
6
I am generating a report from a table and don't want to print (or show the empty)text boxes that have no data in them. I would like the report to close up the space that the text box would have taken

David Smith
 
Set the can shrink property to yes for the relevant text boxes.
 
Rich,

Thanks for the reply. But what I want is for the text box not to show at all if there is no data. I'm thinking that maybe I have to run a query that will filter out the empty data fields.

David
 
If IsNull(Me.TxtName) Then
Me.TxtName.Visible=False
Else
Me.TxtName.Visible=True
End If
in the on format event.
HTH
 
Rich,
That worked well - Thanks.
Now how do remove the blank line so that the blank area shrinks?

David
 
Now I don't understand, if you have text boxes with no data and set the can shrink property to yes, they will shrink anyway.
 
I think what davids is grappling with is a similar problem I am encountering. It would be helpfull to set this up like mailing labels where the fields dissappear automatically. I have tried duplicating the mailing lables using the Trim function, and the can grow, can shrink property but still blank lines remain. I noticed that the mailing labels contain no code.
 
Rich,
Thanks to you input I was able to blank out the line.
I am now trying to get rid of the blank line (get it to shrink). I think the problem may be that there is no can grow/shrink option when the field is a combo box. The combo box shows up in the report and is comming from the original table.

David Smith
 
You don't need a combo box on a report, right click on it in design mode and change it to a text box.
 
I can help with this as someone very patiently sorted it out for me.

The Can Shrink is right but you must make sure the rows are touching each other (no spaces)and that there is absolutely nothing else on the same row like another field otherwise it won't work.

HTH

Paul
 
Rich,
Thank you for your help. Sometimes the simplest things are the hardest to find. Once I changed the combobox to a text box then I could shrink it and the blank line went away.

Thanks again
David Smith
 

Users who are viewing this thread

Back
Top Bottom