Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IF statement to get preferred phone number

Status
Not open for further replies.

Prufrock

Instructor
Sep 4, 2002
77
0
0
AU
I have a registration form which allows people to tick whether they prefer to be contacted on home, work or mobile phone number and they list the number in a field. Their preference is a tick box.

Fields are: Home Preferred(Yes/No) Home Number(text) Work Preferred(Yes/No) Work Number(text) Mobile Preferred(Yes/No) Mobile Number(text)

I have to generate a labels report from this form to a printer. All is set except I need to ensure the preferred phone number appears on the label. This means I need a formula or a way to ensure if there is a tick box entry for that client next to either Home, Mobile or Work then that phone number is returned to the label.

I suspect a query is in order, or/and an If statement of some sort but can anyone assist.
 
In query

PreferredPhoneNo:iif([Home Preferred],[Home Number],IIF([Work Preffered],[Work Number],[Mobile Number]))

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Many Thanks Ken worked like a charm. Well done.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top