invisible labels when there's no data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to hide a lable if there is no data in the text box. i have tried
this with the text box set to "can shrink". i know very little about code
but this is what i wrote. [rec washerr 2] is the text box and [rec 2 washer]
is the label. is this possible? i'm sure it is--i just don't know what i'm
doing.

If [rec washerr 2] Is Null Then [rec 2 washer] = Visible.no
 
Just change your text box....


= "Rec Washer 2: " + [rec washerr 2]



This will print the label (Rec Washer 2: ) followed by the field value. The
plus sign (+) will cause it to only print if there is an entry in both
fields.
 
i'm sorry, i'm a little dense at times...did you mean to do this?

If "rec 2 washer" + [rec washerr 2] Is Null Then [rec 2 washer] = Visible.no

i'm not sure i understood what to do


--
tera


Rick B said:
Just change your text box....


= "Rec Washer 2: " + [rec washerr 2]



This will print the label (Rec Washer 2: ) followed by the field value. The
plus sign (+) will cause it to only print if there is an entry in both
fields.


--
Rick B



turkey said:
I'm trying to hide a lable if there is no data in the text box. i have tried
this with the text box set to "can shrink". i know very little about code
but this is what i wrote. [rec washerr 2] is the text box and [rec 2 washer]
is the label. is this possible? i'm sure it is--i just don't know what i'm
doing.

If [rec washerr 2] Is Null Then [rec 2 washer] = Visible.no
 
tera

It isn't clear from your post if you have "attached" the label to the text
box. If you have the text box set to CanGrow/CanShrink and DO have the
label attached, the text box will handle its label.

Good luck

Jeff Boyce
<Access MVP>
 
PMFJI:
Rick suggested you replace the label and text box with a single text box
containing the caption and value.

If you want to keep these separate, you can simply convert your label to a
text box and set its control source to:
= "Rec Washer 2: " + [rec washer 2 field]
Make sure your "caption" text box is wide enough to display only the caption
and don't allow it to grow.

--
Duane Hookom
MS Access MVP
--

turkey said:
i'm sorry, i'm a little dense at times...did you mean to do this?

If "rec 2 washer" + [rec washerr 2] Is Null Then [rec 2 washer] =
Visible.no

i'm not sure i understood what to do


--
tera


Rick B said:
Just change your text box....


= "Rec Washer 2: " + [rec washerr 2]



This will print the label (Rec Washer 2: ) followed by the field value.
The
plus sign (+) will cause it to only print if there is an entry in both
fields.


--
Rick B



turkey said:
I'm trying to hide a lable if there is no data in the text box. i have tried
this with the text box set to "can shrink". i know very little about
code
but this is what i wrote. [rec washerr 2] is the text box and [rec 2 washer]
is the label. is this possible? i'm sure it is--i just don't know what i'm
doing.

If [rec washerr 2] Is Null Then [rec 2 washer] = Visible.no
 
i have the lable attached to the text box. when there is no value for
receptacle washers, there is a blank spot where the text box is (it
dissapears) but the label still reads "washer".
--
tera


Jeff Boyce said:
tera

It isn't clear from your post if you have "attached" the label to the text
box. If you have the text box set to CanGrow/CanShrink and DO have the
label attached, the text box will handle its label.

Good luck

Jeff Boyce
<Access MVP>

turkey said:
I'm trying to hide a lable if there is no data in the text box. i have tried
this with the text box set to "can shrink". i know very little about code
but this is what i wrote. [rec washerr 2] is the text box and [rec 2 washer]
is the label. is this possible? i'm sure it is--i just don't know what i'm
doing.

If [rec washerr 2] Is Null Then [rec 2 washer] = Visible.no
 
Nope.

I menat to add an un bound text field and put the following in it....

= "Rec Washer 2: " + [rec washerr 2]

Do exactly that. No IF or NULL issues.



--
Rick B



turkey said:
i'm sorry, i'm a little dense at times...did you mean to do this?

If "rec 2 washer" + [rec washerr 2] Is Null Then [rec 2 washer] = Visible.no

i'm not sure i understood what to do


--
tera


Rick B said:
Just change your text box....


= "Rec Washer 2: " + [rec washerr 2]



This will print the label (Rec Washer 2: ) followed by the field value. The
plus sign (+) will cause it to only print if there is an entry in both
fields.


--
Rick B



turkey said:
I'm trying to hide a lable if there is no data in the text box. i
have
tried
this with the text box set to "can shrink". i know very little about code
but this is what i wrote. [rec washerr 2] is the text box and [rec 2 washer]
is the label. is this possible? i'm sure it is--i just don't know
what
i'm
doing.

If [rec washerr 2] Is Null Then [rec 2 washer] = Visible.no
 
--
Rick B



Duane Hookom said:
PMFJI:
Rick suggested you replace the label and text box with a single text box
containing the caption and value.

If you want to keep these separate, you can simply convert your label to a
text box and set its control source to:
= "Rec Washer 2: " + [rec washer 2 field]
Make sure your "caption" text box is wide enough to display only the caption
and don't allow it to grow.

--
Duane Hookom
MS Access MVP
--

turkey said:
i'm sorry, i'm a little dense at times...did you mean to do this?

If "rec 2 washer" + [rec washerr 2] Is Null Then [rec 2 washer] =
Visible.no

i'm not sure i understood what to do


--
tera


Rick B said:
Just change your text box....


= "Rec Washer 2: " + [rec washerr 2]



This will print the label (Rec Washer 2: ) followed by the field value.
The
plus sign (+) will cause it to only print if there is an entry in both
fields.


--
Rick B



I'm trying to hide a lable if there is no data in the text box. i have
tried
this with the text box set to "can shrink". i know very little about
code
but this is what i wrote. [rec washerr 2] is the text box and [rec 2
washer]
is the label. is this possible? i'm sure it is--i just don't know what
i'm
doing.

If [rec washerr 2] Is Null Then [rec 2 washer] = Visible.no
 
Duane:

That is a REALLY good Idea. This let's you keep the alignment that you get
with two cells. I like this!!



--
Rick B



Duane Hookom said:
PMFJI:
Rick suggested you replace the label and text box with a single text box
containing the caption and value.

If you want to keep these separate, you can simply convert your label to a
text box and set its control source to:
= "Rec Washer 2: " + [rec washer 2 field]
Make sure your "caption" text box is wide enough to display only the caption
and don't allow it to grow.

--
Duane Hookom
MS Access MVP
--

turkey said:
i'm sorry, i'm a little dense at times...did you mean to do this?

If "rec 2 washer" + [rec washerr 2] Is Null Then [rec 2 washer] =
Visible.no

i'm not sure i understood what to do


--
tera


Rick B said:
Just change your text box....


= "Rec Washer 2: " + [rec washerr 2]



This will print the label (Rec Washer 2: ) followed by the field value.
The
plus sign (+) will cause it to only print if there is an entry in both
fields.


--
Rick B



I'm trying to hide a lable if there is no data in the text box. i have
tried
this with the text box set to "can shrink". i know very little about
code
but this is what i wrote. [rec washerr 2] is the text box and [rec 2
washer]
is the label. is this possible? i'm sure it is--i just don't know what
i'm
doing.

If [rec washerr 2] Is Null Then [rec 2 washer] = Visible.no
 
If you have any other controls aligned horizontally with the one under
discussion, that one will "hold open" the one you're trying to shrink.

Jeff Boyce
<Access MVP>

turkey said:
i have the lable attached to the text box. when there is no value for
receptacle washers, there is a blank spot where the text box is (it
dissapears) but the label still reads "washer".
--
tera


Jeff Boyce said:
tera

It isn't clear from your post if you have "attached" the label to the
text
box. If you have the text box set to CanGrow/CanShrink and DO have the
label attached, the text box will handle its label.

Good luck

Jeff Boyce
<Access MVP>

turkey said:
I'm trying to hide a lable if there is no data in the text box. i have tried
this with the text box set to "can shrink". i know very little about
code
but this is what i wrote. [rec washerr 2] is the text box and [rec 2 washer]
is the label. is this possible? i'm sure it is--i just don't know what i'm
doing.

If [rec washerr 2] Is Null Then [rec 2 washer] = Visible.no
 
Follow up question please to this helpful hint...when I try to use the
suggested fix below I get an "#Error" for all the fields that DO have data.
The ones that don't are not showing just as suggested they would not, however
the ones with data are showing this "#Error" statement when I view the report.

Any ideas?

Thanks!
Ember

Rick B said:
Nope.

I menat to add an un bound text field and put the following in it....

= "Rec Washer 2: " + [rec washerr 2]

Do exactly that. No IF or NULL issues.



--
Rick B



turkey said:
i'm sorry, i'm a little dense at times...did you mean to do this?

If "rec 2 washer" + [rec washerr 2] Is Null Then [rec 2 washer] = Visible.no

i'm not sure i understood what to do


--
tera


Rick B said:
Just change your text box....


= "Rec Washer 2: " + [rec washerr 2]



This will print the label (Rec Washer 2: ) followed by the field value. The
plus sign (+) will cause it to only print if there is an entry in both
fields.


--
Rick B



I'm trying to hide a lable if there is no data in the text box. i have
tried
this with the text box set to "can shrink". i know very little about code
but this is what i wrote. [rec washerr 2] is the text box and [rec 2
washer]
is the label. is this possible? i'm sure it is--i just don't know what
i'm
doing.

If [rec washerr 2] Is Null Then [rec 2 washer] = Visible.no
 
make sure your textbox controls don't have the same name as the field in the
expression. in other words, if a control's ControlSource is

="Rec Washer 2: " + [rec washerr 2]

then the control's name *cannot* be [rec washerr 2]

hth


Ember said:
Follow up question please to this helpful hint...when I try to use the
suggested fix below I get an "#Error" for all the fields that DO have data.
The ones that don't are not showing just as suggested they would not, however
the ones with data are showing this "#Error" statement when I view the report.

Any ideas?

Thanks!
Ember

Rick B said:
Nope.

I menat to add an un bound text field and put the following in it....

= "Rec Washer 2: " + [rec washerr 2]

Do exactly that. No IF or NULL issues.



--
Rick B



turkey said:
i'm sorry, i'm a little dense at times...did you mean to do this?

If "rec 2 washer" + [rec washerr 2] Is Null Then [rec 2 washer] = Visible.no

i'm not sure i understood what to do


--
tera


:

Just change your text box....


= "Rec Washer 2: " + [rec washerr 2]



This will print the label (Rec Washer 2: ) followed by the field
value.
The
plus sign (+) will cause it to only print if there is an entry in both
fields.


--
Rick B



I'm trying to hide a lable if there is no data in the text box. i have
tried
this with the text box set to "can shrink". i know very little
about
code
but this is what i wrote. [rec washerr 2] is the text box and [rec 2
washer]
is the label. is this possible? i'm sure it is--i just don't know what
i'm
doing.

If [rec washerr 2] Is Null Then [rec 2 washer] = Visible.no
 
Here is what I have for the textbox:

Name is PropInsCoLabel
Control Source is ="Property Insurance Limits: "+[PropInsCo]

Thanks,
Ember

tina said:
make sure your textbox controls don't have the same name as the field in the
expression. in other words, if a control's ControlSource is

="Rec Washer 2: " + [rec washerr 2]

then the control's name *cannot* be [rec washerr 2]

hth


Ember said:
Follow up question please to this helpful hint...when I try to use the
suggested fix below I get an "#Error" for all the fields that DO have data.
The ones that don't are not showing just as suggested they would not, however
the ones with data are showing this "#Error" statement when I view the report.

Any ideas?

Thanks!
Ember

Rick B said:
Nope.

I menat to add an un bound text field and put the following in it....

= "Rec Washer 2: " + [rec washerr 2]

Do exactly that. No IF or NULL issues.



--
Rick B



i'm sorry, i'm a little dense at times...did you mean to do this?

If "rec 2 washer" + [rec washerr 2] Is Null Then [rec 2 washer] =
Visible.no

i'm not sure i understood what to do


--
tera


:

Just change your text box....


= "Rec Washer 2: " + [rec washerr 2]



This will print the label (Rec Washer 2: ) followed by the field value.
The
plus sign (+) will cause it to only print if there is an entry in both
fields.


--
Rick B



I'm trying to hide a lable if there is no data in the text box. i
have
tried
this with the text box set to "can shrink". i know very little about
code
but this is what i wrote. [rec washerr 2] is the text box and [rec 2
washer]
is the label. is this possible? i'm sure it is--i just don't know
what
i'm
doing.

If [rec washerr 2] Is Null Then [rec 2 washer] = Visible.no
 
hmm, well, my only other suggestion at this point is to check the report's
RecordSource and make sure it contains a field named PropInsCo.

hth


Ember said:
Here is what I have for the textbox:

Name is PropInsCoLabel
Control Source is ="Property Insurance Limits: "+[PropInsCo]

Thanks,
Ember

tina said:
make sure your textbox controls don't have the same name as the field in the
expression. in other words, if a control's ControlSource is

="Rec Washer 2: " + [rec washerr 2]

then the control's name *cannot* be [rec washerr 2]

hth


Ember said:
Follow up question please to this helpful hint...when I try to use the
suggested fix below I get an "#Error" for all the fields that DO have data.
The ones that don't are not showing just as suggested they would not, however
the ones with data are showing this "#Error" statement when I view the report.

Any ideas?

Thanks!
Ember

:

Nope.

I menat to add an un bound text field and put the following in it....

= "Rec Washer 2: " + [rec washerr 2]

Do exactly that. No IF or NULL issues.



--
Rick B



i'm sorry, i'm a little dense at times...did you mean to do this?

If "rec 2 washer" + [rec washerr 2] Is Null Then [rec 2 washer] =
Visible.no

i'm not sure i understood what to do


--
tera


:

Just change your text box....


= "Rec Washer 2: " + [rec washerr 2]



This will print the label (Rec Washer 2: ) followed by the field value.
The
plus sign (+) will cause it to only print if there is an entry
in
both
fields.


--
Rick B



I'm trying to hide a lable if there is no data in the text box. i
have
tried
this with the text box set to "can shrink". i know very
little
about
code
but this is what i wrote. [rec washerr 2] is the text box and [rec 2
washer]
is the label. is this possible? i'm sure it is--i just don't know
what
i'm
doing.

If [rec washerr 2] Is Null Then [rec 2 washer] = Visible.no
 
Back
Top