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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Returning a String from an Option Group 1

Status
Not open for further replies.

TechieJr

Instructor
Nov 13, 2002
71
CA
Hi,

I've created a 3 choice option group that records whether a contact phoned, came in for a scheduled meeting, or walked in without an appointment. The result of the option group is a number (stored in the underlying table), but for status forms/reports, etc. I need to know the string/text that goes along with the chosen option for each record. I've tried creating a form based on a query using an IIF statement to generate the string based on the number, but it is only good for choosing 1 of 2 options, not 1 of 3. Can anyone shed some light on this for me? Thanks in advance.
 
You can do three options in an IIF statement by "stacking" them:

IIF(OptionNumber=1,"Called",IIF(OptionNumber=2,"Appointment","Walk-in"))

 
Great! Thank you very much. I tried it just as you wrote it (replacing "OptionNumber" with the appropriate field name, of course) and got an #Error# message in return. Progress I thought. Thought about it for a moment and tried putting the numbers in quotation marks and it worked like a charm. Thanks for getting this newbie on the right track.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top