Option Group

  • Thread starter Thread starter ladybug via AccessMonster.com
  • Start date Start date
L

ladybug via AccessMonster.com

I have a query with a field from an option group. 1=Internal, 2=Client.
Now in my query how do I have it return the text Internal and Client instead
of 1 and 2. The field name is RequestedBy.
I think this should be fairly easy, but I have never used it before.
 
Take a look at the IIF() function in Access HELP. You could add a new field
in your query and use something like (untested):

NewField: IIF([RequestedBy] = 1, "Internal", "Client")

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
That is almost perfect, but if it is not selected (0) I do not want Client
returned. I would just want it to be blank.

Jeff said:
Take a look at the IIF() function in Access HELP. You could add a new field
in your query and use something like (untested):

NewField: IIF([RequestedBy] = 1, "Internal", "Client")

Regards

Jeff Boyce
Microsoft Office/Access MVP
I have a query with a field from an option group. 1=Internal, 2=Client.
Now in my query how do I have it return the text Internal and Client
instead
of 1 and 2. The field name is RequestedBy.
I think this should be fairly easy, but I have never used it before.
 
That is almost perfect, but if it is not selected (0) I do not want Client
returned. I would just want it to be blank.

Jeff said:
Take a look at the IIF() function in Access HELP. You could add a new field
in your query and use something like (untested):

NewField: IIF([RequestedBy] = 1, "Internal", "Client")

Regards

Jeff Boyce
Microsoft Office/Access MVP
I have a query with a field from an option group. 1=Internal, 2=Client.
Now in my query how do I have it return the text Internal and Client
instead
of 1 and 2. The field name is RequestedBy.
I think this should be fairly easy, but I have never used it before.

NewField: IIF([RequestedBy] = 1, "Internal", IIf([RequestedBy] = 2,
"Client",""))
 
THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!
That is almost perfect, but if it is not selected (0) I do not want Client
returned. I would just want it to be blank.
[quoted text clipped - 14 lines]
NewField: IIF([RequestedBy] = 1, "Internal", IIf([RequestedBy] = 2,
"Client",""))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top