iif with a checkbox on phone number (1 Viewer)

mrrayj60

Registered User.
Local time
Today, 07:20
Joined
Sep 3, 2009
Messages
103
Report on residents.

=IIf([unlisted]=True,999-999-9999,[phone])

Unlisted is a check box and if its checked we dont want to print the phone number.

data source is a query, the result is #error in phone number.
Can anyone shed some lite on my problem, Thanks Ray
 

SOS

Registered Lunatic
Local time
Today, 04:20
Joined
Aug 27, 2008
Messages
3,517
Make sure the FIELD and the CONTROL are not both named PHONE. Change the CONTROL Name to txtPhone and then use PHONE in the function still (using the field is the way to go for a report).
 

mrrayj60

Registered User.
Local time
Today, 07:20
Joined
Sep 3, 2009
Messages
103
Thank you very much, that fixed it--Ray
 

Users who are viewing this thread

Top Bottom