Conditional or Criteria Formatting in a Query

C

C. Sharp

I have a field named "Identifer" in my master table that
accepts codes for ease of data entry. Is there a way for
a Query to take these codes and convert them into text,
i.e. Identifier = "MD" but on the query I would like for
it to change the text MD to actually display "Doctor".

Unfortunately, I have to use a query since I am having to
filter data and dump it into an Excel spreadsheet.

Any ideas?
 
F

Fredg

What do you want to happen if the [Identifier] is NOT "MD"?

SomeField:IIf([Identifier] = "MD","Doctor",Otherwise what?)
 
F

Fredg

SomeField:IIf([Identifier] = "MD","Doctor","N/A")

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


C. Sharp said:
Else print "NA"
-----Original Message-----
What do you want to happen if the [Identifier] is NOT "MD"?

SomeField:IIf([Identifier] = "MD","Doctor",Otherwise what?)
--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


C. Sharp said:
I have a field named "Identifer" in my master table that
accepts codes for ease of data entry. Is there a way for
a Query to take these codes and convert them into text,
i.e. Identifier = "MD" but on the query I would like for
it to change the text MD to actually display "Doctor".

Unfortunately, I have to use a query since I am having to
filter data and dump it into an Excel spreadsheet.

Any ideas?


.
 
C

C. Sharp

How would I do this if I had about 12 different
Identifiers in a drop down list that I want to display
the long version. Can I use this conditional IF for all
12? If so, how would I do that? This is an example of
what I am trying to do:

EX: Identifier Display
MD Doctor
RN Registered Nurse
LPN Licensed Practical Nurse
LAB Lab Technician
PT Physical Therapist

Make sense?
-----Original Message-----
SomeField:IIf([Identifier] = "MD","Doctor","N/A")

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


C. Sharp said:
Else print "NA"
-----Original Message-----
What do you want to happen if the [Identifier] is NOT "MD"?

SomeField:IIf([Identifier] = "MD","Doctor",Otherwise what?)
--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


I have a field named "Identifer" in my master table that
accepts codes for ease of data entry. Is there a
way
for
a Query to take these codes and convert them into text,
i.e. Identifier = "MD" but on the query I would
like
for
it to change the text MD to actually display "Doctor".

Unfortunately, I have to use a query since I am
having
to
filter data and dump it into an Excel spreadsheet.

Any ideas?


.


.
 
J

John Spencer (MVP)

I would add a table to my structure taht contained the abbreviation and the
expansion. Then when I needed the expansion, all I would need is to include the
table in my query and join it on the identifier to the table that current holds
the MD, RN, etc.

That way it is easy to ADD a new Identifier/expansion pair by adding a new row
to the table.


C. Sharp said:
How would I do this if I had about 12 different
Identifiers in a drop down list that I want to display
the long version. Can I use this conditional IF for all
12? If so, how would I do that? This is an example of
what I am trying to do:

EX: Identifier Display
MD Doctor
RN Registered Nurse
LPN Licensed Practical Nurse
LAB Lab Technician
PT Physical Therapist

Make sense?
-----Original Message-----
SomeField:IIf([Identifier] = "MD","Doctor","N/A")

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


C. Sharp said:
Else print "NA"
-----Original Message-----
What do you want to happen if the [Identifier] is
NOT "MD"?

SomeField:IIf([Identifier] = "MD","Doctor",Otherwise
what?)
--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


I have a field named "Identifer" in my master table
that
accepts codes for ease of data entry. Is there a way
for
a Query to take these codes and convert them into text,
i.e. Identifier = "MD" but on the query I would like
for
it to change the text MD to actually display "Doctor".

Unfortunately, I have to use a query since I am having
to
filter data and dump it into an Excel spreadsheet.

Any ideas?


.


.
 

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

Top