supressing textbox labels

  • Thread starter pamdixon via AccessMonster.com
  • Start date
P

pamdixon via AccessMonster.com

I have a report that has 20 textboxes with labels. Not all textboxes have
data. I set the "can shrink" to "yes" and it supresses the textboxes but I
still see the labels.

How do I supress the labels?
 
R

RayV

pamdixon said:
I have a report that has 20 textboxes with labels. Not all textboxes have
data. I set the "can shrink" to "yes" and it supresses the textboxes but I
still see the labels.

How do I supress the labels?

If you don't want to write code do this:
1 change the labels to text boxes
2 change control source of the text boxes to:
=IIf(IsNull([DATA]),Null,"DATA Label")
DATA would of course be the data field that relates to the
textbox/label
 
P

pamdixon via AccessMonster.com

Ray,
Thanks for the reply, what if I want to keep the boxes as labels?
I've seen a few posts about code but I can't figure out what to write and
where to put it.
I have a report that has 20 textboxes with labels. Not all textboxes have
data. I set the "can shrink" to "yes" and it supresses the textboxes but I
[quoted text clipped - 5 lines]
Message posted via AccessMonster.com

If you don't want to write code do this:
1 change the labels to text boxes
2 change control source of the text boxes to:
=IIf(IsNull([DATA]),Null,"DATA Label")
DATA would of course be the data field that relates to the
textbox/label
 
F

fredg

Ray,
Thanks for the reply, what if I want to keep the boxes as labels?
I've seen a few posts about code but I can't figure out what to write and
where to put it.
I have a report that has 20 textboxes with labels. Not all textboxes have
data. I set the "can shrink" to "yes" and it supresses the textboxes but I
[quoted text clipped - 5 lines]
Message posted via AccessMonster.com

If you don't want to write code do this:
1 change the labels to text boxes
2 change control source of the text boxes to:
=IIf(IsNull([DATA]),Null,"DATA Label")
DATA would of course be the data field that relates to the
textbox/label

If you want to keep the labels as labels you will need to write code .

In Report Design View, right-click on the Detail section.
Select Properties.
Click on the Event tab.
On the line that says On Format, write:
[Event Procedure]
Then click on the little button with 3 dots that appears on that line.
When the code window opens, the cursor will be flashing between 2
already written lines of code.
Between those 2 lines, write:

Me![LabelName1].Visible = Not IsNull([ControlName1])
Me![LabelName2].Visible = Not IsNull([ControlName2])
etc.


Change the control names to whatever the actual control names are in
the report.
Exit the code window. Run the report.

What's wrong with simply using a text control instead of a label?
 
P

pamdixon via AccessMonster.com

Thank You!!!!!
It works perfectly
Ray,
Thanks for the reply, what if I want to keep the boxes as labels?
[quoted text clipped - 13 lines]
If you want to keep the labels as labels you will need to write code .

In Report Design View, right-click on the Detail section.
Select Properties.
Click on the Event tab.
On the line that says On Format, write:
[Event Procedure]
Then click on the little button with 3 dots that appears on that line.
When the code window opens, the cursor will be flashing between 2
already written lines of code.
Between those 2 lines, write:

Me![LabelName1].Visible = Not IsNull([ControlName1])
Me![LabelName2].Visible = Not IsNull([ControlName2])
etc.

Change the control names to whatever the actual control names are in
the report.
Exit the code window. Run the report.

What's wrong with simply using a text control instead of a label?
 

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