i want no text box and label when print if empty

thrust

Registered User.
Local time
Today, 22:41
Joined
Jan 2, 2009
Messages
18
I select the section of my report and on format event i put the setProperty action and arguing property visible to zero. What i cannot do is fill properly the condition column in order to make my text box (and it's label) unvisible when i print my report.

Please welcome any suggestions!
 
On both the label and the textbox:
The border style has to be trasparent.
Also the back style has to be transparent.

If its a number field you may have a zero, but that can also be fixed at the table level properties.

Good luck.

i highlight the fact that the text box and label of the report mustn't be printed if the text box has no information in it. The data source of the text box is a memo data field.
 
I can't give you a macro based solution because it has been too long since I've used them. But a VBA solution would be to open the Report in Design View, go to the section where the text box is in and then go to the On FORMAT property of that section. And by going there, I mean in the VBA Window. See here if you aren't sure how to get there for an event.

Then you can just put
Code:
Me.YourTextBoxNameHere.Visible = (Len(Me.YourTextBoxNameHere & "") > 0)

Leave the ME just as shown (that refers to the current class object which is the report), and change the YourTextBoxNameHere to the name of the text box. If the label is associated with the text box then it will also disappear when there is no data.
 
I can't give you a macro based solution because it has been too long since I've used them. But a VBA solution would be to open the Report in Design View, go to the section where the text box is in and then go to the On FORMAT property of that section. And by going there, I mean in the VBA Window. See here if you aren't sure how to get there for an event.

Then you can just put
Code:
Me.YourTextBoxNameHere.Visible = (Len(Me.YourTextBoxNameHere & "") > 0)

Leave the ME just as shown (that refers to the current class object which is the report), and change the YourTextBoxNameHere to the name of the text box. If the label is associated with the text box then it will also disappear when there is no data.
THANK YOU a lot! It worked perfectly!
 

Users who are viewing this thread

Back
Top Bottom