converting text

T

twd

I have a database that is linked to an Excel spreadsheet. For ease of use,
when the spreadsheet is populated several of the answers are typed as single
characters, for example: I is used to represent IN-TIME, E = EARLY. I would
like to avoid having to run a find/replace on the spreadsheet each time new
data is entered.

The query I am using counts the number of IN-TIMES, EARLY's, etc. and is
used as the backend for a report. Is there a way to have either the query or
the report automatically convert the single character into the appropriate
word?

Thanks
 
M

MGFoster

twd said:
I have a database that is linked to an Excel spreadsheet. For ease of use,
when the spreadsheet is populated several of the answers are typed as single
characters, for example: I is used to represent IN-TIME, E = EARLY. I would
like to avoid having to run a find/replace on the spreadsheet each time new
data is entered.

The query I am using counts the number of IN-TIMES, EARLY's, etc. and is
used as the backend for a report. Is there a way to have either the query or
the report automatically convert the single character into the appropriate
word?

You can use the IIf() function or the Switch() function. E.g.:

IIf(Answer="I","In-Time", IIf(Answer="E","Early"))

Switch(Answer="I", "In-Time", Answer="E","Early")

I like Switch, 'cuz it's cleaner.
 
T

twd

Sweet!, Thanks for the quick response

MGFoster said:
You can use the IIf() function or the Switch() function. E.g.:

IIf(Answer="I","In-Time", IIf(Answer="E","Early"))

Switch(Answer="I", "In-Time", Answer="E","Early")

I like Switch, 'cuz it's cleaner.
 
Top