iif / isnull syntax problem

M

michael

I have searched many posting, and I have not found an answer.

I have a flag on a form. In my report, if the flag is True, I want to print
a field from another table. I am using the following in the Control Source:

=IIf(IsNull([RSVP1]),[BadgeText1],"NO RSVP")

I am very new to Access and I learn every day here.....

TIA,
michael
 
D

Duane Hookom

Are there fields in your report's record source named "RSVP1" and
"BadgeText1"?

Is there a problem/error with the expression you provided?
 
M

michael

Yes. They are in the SQL query (hope that is correct)

The error I was getting was '#Error', but now I can't seem to not have the
text 'NO RSVP' print.

TIA,
michael


Duane Hookom said:
Are there fields in your report's record source named "RSVP1" and
"BadgeText1"?

Is there a problem/error with the expression you provided?

--
Duane Hookom
MS Access MVP
--

michael said:
I have searched many posting, and I have not found an answer.

I have a flag on a form. In my report, if the flag is True, I want to
print
a field from another table. I am using the following in the Control
Source:

=IIf(IsNull([RSVP1]),[BadgeText1],"NO RSVP")

I am very new to Access and I learn every day here.....

TIA,
michael
 
D

Duane Hookom

It might be possible that the field is not null. You might want to try:

=IIf(Len(Trim([RSVP1] & ""))=0,[BadgeText1],"NO RSVP")


--
Duane Hookom
MS Access MVP


michael said:
Yes. They are in the SQL query (hope that is correct)

The error I was getting was '#Error', but now I can't seem to not have the
text 'NO RSVP' print.

TIA,
michael


Duane Hookom said:
Are there fields in your report's record source named "RSVP1" and
"BadgeText1"?

Is there a problem/error with the expression you provided?

--
Duane Hookom
MS Access MVP
--

michael said:
I have searched many posting, and I have not found an answer.

I have a flag on a form. In my report, if the flag is True, I want to
print
a field from another table. I am using the following in the Control
Source:

=IIf(IsNull([RSVP1]),[BadgeText1],"NO RSVP")

I am very new to Access and I learn every day here.....

TIA,
michael
 
M

michael

Thanks. I now do not get the error, but the 'NO RSVP' shows up in both
cases.

The RSVP1 field is a FLAG. That is why I thought IsNull would work.

Any other ideas, TIA.
michael


Duane Hookom said:
It might be possible that the field is not null. You might want to try:

=IIf(Len(Trim([RSVP1] & ""))=0,[BadgeText1],"NO RSVP")


--
Duane Hookom
MS Access MVP


michael said:
Yes. They are in the SQL query (hope that is correct)

The error I was getting was '#Error', but now I can't seem to not have the
text 'NO RSVP' print.

TIA,
michael


Duane Hookom said:
Are there fields in your report's record source named "RSVP1" and
"BadgeText1"?

Is there a problem/error with the expression you provided?

--
Duane Hookom
MS Access MVP
--

I have searched many posting, and I have not found an answer.

I have a flag on a form. In my report, if the flag is True, I want to
print
a field from another table. I am using the following in the Control
Source:

=IIf(IsNull([RSVP1]),[BadgeText1],"NO RSVP")

I am very new to Access and I learn every day here.....

TIA,
michael
 
D

Duane Hookom

What's a "FLAG"? Do you mean RSVP1 is a yes/no field? If so, try:
=IIf([RSVP1], [BadgeText1],"NO RSVP")


--
Duane Hookom
MS Access MVP


michael said:
Thanks. I now do not get the error, but the 'NO RSVP' shows up in both
cases.

The RSVP1 field is a FLAG. That is why I thought IsNull would work.

Any other ideas, TIA.
michael


Duane Hookom said:
It might be possible that the field is not null. You might want to try:

=IIf(Len(Trim([RSVP1] & ""))=0,[BadgeText1],"NO RSVP")


--
Duane Hookom
MS Access MVP


michael said:
Yes. They are in the SQL query (hope that is correct)

The error I was getting was '#Error', but now I can't seem to not have
the
text 'NO RSVP' print.

TIA,
michael


:

Are there fields in your report's record source named "RSVP1" and
"BadgeText1"?

Is there a problem/error with the expression you provided?

--
Duane Hookom
MS Access MVP
--

I have searched many posting, and I have not found an answer.

I have a flag on a form. In my report, if the flag is True, I want
to
print
a field from another table. I am using the following in the Control
Source:

=IIf(IsNull([RSVP1]),[BadgeText1],"NO RSVP")

I am very new to Access and I learn every day here.....

TIA,
michael
 
M

michael

Duane,

I really appreaciate your help. Yes, it is a yes/no field.

Now, this gives me the '#Error' error. If I understand that, it means that
the [BadgeText1] is not available. Is that correct?

tia,
michael

Duane Hookom said:
What's a "FLAG"? Do you mean RSVP1 is a yes/no field? If so, try:
=IIf([RSVP1], [BadgeText1],"NO RSVP")


--
Duane Hookom
MS Access MVP


michael said:
Thanks. I now do not get the error, but the 'NO RSVP' shows up in both
cases.

The RSVP1 field is a FLAG. That is why I thought IsNull would work.

Any other ideas, TIA.
michael


Duane Hookom said:
It might be possible that the field is not null. You might want to try:

=IIf(Len(Trim([RSVP1] & ""))=0,[BadgeText1],"NO RSVP")


--
Duane Hookom
MS Access MVP


Yes. They are in the SQL query (hope that is correct)

The error I was getting was '#Error', but now I can't seem to not have
the
text 'NO RSVP' print.

TIA,
michael


:

Are there fields in your report's record source named "RSVP1" and
"BadgeText1"?

Is there a problem/error with the expression you provided?

--
Duane Hookom
MS Access MVP
--

I have searched many posting, and I have not found an answer.

I have a flag on a form. In my report, if the flag is True, I want
to
print
a field from another table. I am using the following in the Control
Source:

=IIf(IsNull([RSVP1]),[BadgeText1],"NO RSVP")

I am very new to Access and I learn every day here.....

TIA,
michael
 
M

michael

Duane,

I just verified that [BadgeText1] is available.


Duane Hookom said:
What's a "FLAG"? Do you mean RSVP1 is a yes/no field? If so, try:
=IIf([RSVP1], [BadgeText1],"NO RSVP")


--
Duane Hookom
MS Access MVP


michael said:
Thanks. I now do not get the error, but the 'NO RSVP' shows up in both
cases.

The RSVP1 field is a FLAG. That is why I thought IsNull would work.

Any other ideas, TIA.
michael


Duane Hookom said:
It might be possible that the field is not null. You might want to try:

=IIf(Len(Trim([RSVP1] & ""))=0,[BadgeText1],"NO RSVP")


--
Duane Hookom
MS Access MVP


Yes. They are in the SQL query (hope that is correct)

The error I was getting was '#Error', but now I can't seem to not have
the
text 'NO RSVP' print.

TIA,
michael


:

Are there fields in your report's record source named "RSVP1" and
"BadgeText1"?

Is there a problem/error with the expression you provided?

--
Duane Hookom
MS Access MVP
--

I have searched many posting, and I have not found an answer.

I have a flag on a form. In my report, if the flag is True, I want
to
print
a field from another table. I am using the following in the Control
Source:

=IIf(IsNull([RSVP1]),[BadgeText1],"NO RSVP")

I am very new to Access and I learn every day here.....

TIA,
michael
 
M

michael

Another note, looking at the report, the text box has an error:

Invalid Control Property: Control Source
Circular Reference

Does that help?
michael

Duane Hookom said:
What's a "FLAG"? Do you mean RSVP1 is a yes/no field? If so, try:
=IIf([RSVP1], [BadgeText1],"NO RSVP")


--
Duane Hookom
MS Access MVP


michael said:
Thanks. I now do not get the error, but the 'NO RSVP' shows up in both
cases.

The RSVP1 field is a FLAG. That is why I thought IsNull would work.

Any other ideas, TIA.
michael


Duane Hookom said:
It might be possible that the field is not null. You might want to try:

=IIf(Len(Trim([RSVP1] & ""))=0,[BadgeText1],"NO RSVP")


--
Duane Hookom
MS Access MVP


Yes. They are in the SQL query (hope that is correct)

The error I was getting was '#Error', but now I can't seem to not have
the
text 'NO RSVP' print.

TIA,
michael


:

Are there fields in your report's record source named "RSVP1" and
"BadgeText1"?

Is there a problem/error with the expression you provided?

--
Duane Hookom
MS Access MVP
--

I have searched many posting, and I have not found an answer.

I have a flag on a form. In my report, if the flag is True, I want
to
print
a field from another table. I am using the following in the Control
Source:

=IIf(IsNull([RSVP1]),[BadgeText1],"NO RSVP")

I am very new to Access and I learn every day here.....

TIA,
michael
 
D

Duane Hookom

Make sure the name of the text box is not the name of one of your fields.

--
Duane Hookom
MS Access MVP
--

michael said:
Another note, looking at the report, the text box has an error:

Invalid Control Property: Control Source
Circular Reference

Does that help?
michael

Duane Hookom said:
What's a "FLAG"? Do you mean RSVP1 is a yes/no field? If so, try:
=IIf([RSVP1], [BadgeText1],"NO RSVP")


--
Duane Hookom
MS Access MVP


michael said:
Thanks. I now do not get the error, but the 'NO RSVP' shows up in both
cases.

The RSVP1 field is a FLAG. That is why I thought IsNull would work.

Any other ideas, TIA.
michael


:

It might be possible that the field is not null. You might want to
try:

=IIf(Len(Trim([RSVP1] & ""))=0,[BadgeText1],"NO RSVP")


--
Duane Hookom
MS Access MVP


Yes. They are in the SQL query (hope that is correct)

The error I was getting was '#Error', but now I can't seem to not
have
the
text 'NO RSVP' print.

TIA,
michael


:

Are there fields in your report's record source named "RSVP1" and
"BadgeText1"?

Is there a problem/error with the expression you provided?

--
Duane Hookom
MS Access MVP
--

I have searched many posting, and I have not found an answer.

I have a flag on a form. In my report, if the flag is True, I
want
to
print
a field from another table. I am using the following in the
Control
Source:

=IIf(IsNull([RSVP1]),[BadgeText1],"NO RSVP")

I am very new to Access and I learn every day here.....

TIA,
michael
 
Top