more #Error Arrrrrrrrrggggggggghhhhhhhhhh!

J

JohnLute

My report has an unbound text box with this control source:
="Application "+IIf(IsNull([Application] & [ApplicationComments]),Null,"")

When I execute the report the text box returns the dreaded #Error.

The field for "Application" is a list box. At first I thought maybe this was
clashing but I don't have trouble with any other list box field types. I'm
confused as to why this one is dumping.

If I take out [Application] and leave only [ApplicationComments] then
everything is fine. If I mix and match other field names the text box returns
OK so I know it's not the code.

This isn't making sense to me. Does anyone see what I'm missing?

Thanks!!!
 
D

Duane Hookom

Consider changing the name "Application" to something else in your report's
record source. Application is a reserved word and could be the source of
your issue. Also, I think you want to use:
="Application "+IIf(IsNull([ApplicationField] +
[ApplicationComments]),Null,"")
 
M

Marshall Barton

JohnLute said:
My report has an unbound text box with this control source:
="Application "+IIf(IsNull([Application] & [ApplicationComments]),Null,"")

When I execute the report the text box returns the dreaded #Error.

The field for "Application" is a list box. At first I thought maybe this was
clashing but I don't have trouble with any other list box field types. I'm
confused as to why this one is dumping.

If I take out [Application] and leave only [ApplicationComments] then
everything is fine. If I mix and match other field names the text box returns
OK so I know it's not the code.


You don't suppose that the fact that Application is a
reserved word has something to do with the problem??

Try changing the list box's name to something else.
 
B

BruceM

Keeping in mind what has already been said about "Application", try
[FieldName] Is Null as the syntax. It seems to me that Null and "" will
yield the same result as True and as False.
 
J

JohnLute

Sheeesh. I just can't believe all the twists and turns there are!

I changed names and things work fine. Thanks for everyone's input.

As for the "+" I use the "&" as it returns the results I need. Previously, I
mistakenly misunderstood things. What I need is for the label to appear if
the value OR the comments were entered.

Big thanks, again!

--
www.Marzetti.com


Duane Hookom said:
Consider changing the name "Application" to something else in your report's
record source. Application is a reserved word and could be the source of
your issue. Also, I think you want to use:
="Application "+IIf(IsNull([ApplicationField] +
[ApplicationComments]),Null,"")


--
Duane Hookom
MS Access MVP
--

JohnLute said:
My report has an unbound text box with this control source:
="Application "+IIf(IsNull([Application] &
[ApplicationComments]),Null,"")

When I execute the report the text box returns the dreaded #Error.

The field for "Application" is a list box. At first I thought maybe this
was
clashing but I don't have trouble with any other list box field types. I'm
confused as to why this one is dumping.

If I take out [Application] and leave only [ApplicationComments] then
everything is fine. If I mix and match other field names the text box
returns
OK so I know it's not the code.

This isn't making sense to me. Does anyone see what I'm missing?

Thanks!!!
 
Top