Help with building a query

TravelingCat

Registered User.
Local time
Today, 15:01
Joined
Feb 22, 2010
Messages
42
Hello,
I need to make a query, which will use one table. This table has a field called "participatedHow", which stands for how did worker participate in a certain event (1 = present, 2 = via telephone, 3 = ..., 4 = ...). The problem is that this field is represented by numbers 1 to 4, but there is no place in database that the textual meaning of this numbers is saved. When i use it in a form i just add the meaning manually in comobobox's value list. So is it someway possible to represent the textual meaning of this field in a query?
Thanks in advance for any help
 
ideally have another table to act as a lookup table

otherwise you have to hard code stuff in lookups etc, as a value list, or in queries as a switch function.
 
Yes i understand that will be the most logical, but i already use it in some places as it is, and the program is already in production, so i'd rather solve this without creating another table, if it's possible.
Can you explain in a little bit more details how to do this?
 
Hello,
I need to make a query, which will use one table. This table has a field called "participatedHow", which stands for how did worker participate in a certain event (1 = present, 2 = via telephone, 3 = ..., 4 = ...). The problem is that this field is represented by numbers 1 to 4, but there is no place in database that the textual meaning of this numbers is saved. When i use it in a form i just add the meaning manually in comobobox's value list. So is it someway possible to represent the textual meaning of this field in a query?
Thanks in advance for any help

Dave's suggestion is the correct way to go.

In the query you could add an expression with an IIF statement, but that also depends on how many options you want

Expression1:IIF([participatedHow]=1,"present",IIF([participatedHow]=2,"via telephone",IIF([participatedHow]=3,"Next option","")))
 
Trevor and Dave, thank you! I feel really dumb for not thinking about this myself..:o
 

Users who are viewing this thread

Back
Top Bottom