<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)
> Hi all,
>
> I have a table of data that are answers to questions. For instance:
>
> 'Did Upsell?' = 1 if 'yes', 0 if 'no', and -1 if NA (in the table).
>
> The controls in my report that I've created will naturally display the
> numeric numbers. I'd like it to re-interpret it so that it displays
> 'yes', 'no' or 'n/a' (sort of a conditional format I guess) and not
> the numeric value in the table.
>
> Having never used the reports functionality of access, I'm a little
> lost. Perhaps it's better to actually store 'yes', 'no', 'n/a' in the
> table to begin with?
>
> All help appreciated.
>
> Cheers
>
> Red
There are a couple of ways to do this. You could use a calculated
control on the report, with a controlsource like
=Choose([Response]+2, "N/A", "No", "Yes")
or
=Switch([Response]=1, "Yes", [Response]=0, "No", [Response]=-1,
"N/A", True, "")
For more flexibility, you might have a table ResponseTranslation, with
fields ResponseNum and ResponseText, and load it with records like
these:
ResponseNum ResponseText
------------------ -------------------
-1 N/A
0 No
1 Yes
Then you'd base your report on a query that joins the
ResponseTranslation table to your existing table or query, linking the
ResponseNum field to your current Response field, and including the
ResponseText field in the query results. Bind a text box on the report
to ResponseText, and there you have it.
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)