Expression in Label Report

G

Guest

I have a label table where there is a column for building #'s. Only about
half of these fields have a text in them. I'd like to write an expression in
the label report that says if there is an item in the field put the word
Buidling in front on it, if not skip the line. I've tried some things but I
keep getting the word building on lines where these is no text for that
field.
 
B

Brendan Reynolds

Regi said:
I have a label table where there is a column for building #'s. Only about
half of these fields have a text in them. I'd like to write an expression
in
the label report that says if there is an item in the field put the word
Buidling in front on it, if not skip the line. I've tried some things but
I
keep getting the word building on lines where these is no text for that
field.


=IIf(Len([TestText] & "")=0,"","Building " & [TestText])

Replace "TestText" in this example with the name of your building number
field. Also make sure that the name of the text box on the report is not the
same as the name of the field, or you will get an error message that the
control has a reference to itself.
 
G

Guest

I am having a circular reference problem. The name in the table and Query is
BLDG in the report I changed the Text box name to BLDG#. What am I missing?
Thanks Regi

Brendan Reynolds said:
Regi said:
I have a label table where there is a column for building #'s. Only about
half of these fields have a text in them. I'd like to write an expression
in
the label report that says if there is an item in the field put the word
Buidling in front on it, if not skip the line. I've tried some things but
I
keep getting the word building on lines where these is no text for that
field.


=IIf(Len([TestText] & "")=0,"","Building " & [TestText])

Replace "TestText" in this example with the name of your building number
field. Also make sure that the name of the text box on the report is not the
same as the name of the field, or you will get an error message that the
control has a reference to itself.
 
B

Brendan Reynolds

Regi said:
I am having a circular reference problem. The name in the table and Query
is
BLDG in the report I changed the Text box name to BLDG#. What am I
missing?
Thanks Regi


If you could copy and post the expression from the Control Source property
of the text box, it might be possible to see what the problem is.
 
G

Guest

=IIf(Len([BLDG#] & "")=0,"","Building" & [BLDG#])
Thanks

Regi said:
I am having a circular reference problem. The name in the table and Query is
BLDG in the report I changed the Text box name to BLDG#. What am I missing?
Thanks Regi

Brendan Reynolds said:
Regi said:
I have a label table where there is a column for building #'s. Only about
half of these fields have a text in them. I'd like to write an expression
in
the label report that says if there is an item in the field put the word
Buidling in front on it, if not skip the line. I've tried some things but
I
keep getting the word building on lines where these is no text for that
field.


=IIf(Len([TestText] & "")=0,"","Building " & [TestText])

Replace "TestText" in this example with the name of your building number
field. Also make sure that the name of the text box on the report is not the
same as the name of the field, or you will get an error message that the
control has a reference to itself.
 
B

Brendan Reynolds

Well there you go then ... you've got the name of the text box instead of
the name of the field in the expression. You need to change both references
to "BLDG#" in the expression to "BLDG".

You may have fallen prey to the "Name AutoCorrect" feature, which may have
"helpfully" rewritten the expression for you when you changed the name of
the text box.
=IIf(Len([BLDG#] & "")=0,"","Building" & [BLDG#])
Thanks

Regi said:
I am having a circular reference problem. The name in the table and Query
is
BLDG in the report I changed the Text box name to BLDG#. What am I
missing?

<snip>
 
G

Guest

Thanks Brenda! I think you're right about the Name auto correct. I appreciate
your help! Regi

Brendan Reynolds said:
Well there you go then ... you've got the name of the text box instead of
the name of the field in the expression. You need to change both references
to "BLDG#" in the expression to "BLDG".

You may have fallen prey to the "Name AutoCorrect" feature, which may have
"helpfully" rewritten the expression for you when you changed the name of
the text box.
=IIf(Len([BLDG#] & "")=0,"","Building" & [BLDG#])
Thanks

Regi said:
I am having a circular reference problem. The name in the table and Query
is
BLDG in the report I changed the Text box name to BLDG#. What am I
missing?

<snip>
 

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