Visible on a report

  • Thread starter Thread starter Lee via AccessMonster.com
  • Start date Start date
L

Lee via AccessMonster.com

Hi,

Could you help?

I have a form that is used for printing labels, there are 8 labels per sheet.
so on the form there are 8 different data boxes. On the report there are text
fields and data fields. If you entered any data it pulls it down to the
report.

So say you entered data in fields 2 - 3 - 5 - 6 it would print on these
labels, so that I dont waste labels. The thing is that it also prints the
text field to the report (this is OK) but I dont want the text fields to show
if I have not filled in the data field (fields 1 - 4 - 7- 8)

Sorry if I haven't explained it very well..

Thanks in advance

Lee
 
Any Luck?
Hi,

Could you help?

I have a form that is used for printing labels, there are 8 labels per sheet.
so on the form there are 8 different data boxes. On the report there are text
fields and data fields. If you entered any data it pulls it down to the
report.

So say you entered data in fields 2 - 3 - 5 - 6 it would print on these
labels, so that I dont waste labels. The thing is that it also prints the
text field to the report (this is OK) but I dont want the text fields to show
if I have not filled in the data field (fields 1 - 4 - 7- 8)

Sorry if I haven't explained it very well..

Thanks in advance

Lee
 
Hard to understand your structure, but I think you have set up a non-standard
label report. But as a guess you would need code in the report that would test
to see if there was data in the section (1 to 8) and then hide the label
controls (your "text fields").

In the format event of whichever section (detail section?) contains your
"labels" you would need VBA code something like

If Len(Me.YourDataControlName & "") = 0 Then
Me.[YourTextFieldName].Visible = False
Me.[AnotherTextFieldName].Visible= False
...
Else
Me.[YourTextFieldName].Visible = True
Me.[AnotherTextFieldName].Visible= True
....
End If
 
Hi,

Been trying to get this to work, but what do you mean by "Me." ?

Many thanks

Lee

If Len(Me.YourDataControlName & "") = 0 Then
Me.[YourTextFieldName].Visible = False
Me.[AnotherTextFieldName].Visible= False
...
Else
Me.[YourTextFieldName].Visible = True
Me.[AnotherTextFieldName].Visible= True
...
End If
 
Back
Top