Hiding Labels on Report

M

Marshall Barton

Dan said:
How can I hide labels to fields that don't have any data
in them?


Use a little code in the Format event of the section
containg the controls:

Me.sometextbox.Visible = Not IsNull(Me.sometextbox)
 
M

My-Yen

Sorry, I am not clear where I could input the codes to
(format event). I am a beginner. I have textboxes that
either contains the control source (fieldname) or starts
with the =trim statement.
Thanks!
 
M

Marshall Barton

My-Yen said:
Sorry, I am not clear where I could input the codes to
(format event). I am a beginner. I have textboxes that
either contains the control source (fieldname) or starts
with the =trim statement.

You can get to the Format event procedure by clicking on a
blank area of the section containing the text box / label
that you want to make visible or not. Then look at the
section's Propert Sheet (View menu) look around the property
list and click on the Format property. Then select [Event
Procedure] in the properties drop down list (on right side
of the property. Next, clicking on the ... button at the
far right of the property should take you to the section's
Format event procedure where you can add te code.
--
Marsh
MVP [MS Access]


 

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