option group and display in report ??

P

pakerly

I've got a form that has an option group on it:

__ Monday
__ Tuesday
__ Wednesday

and the value for the option group items are: 1 for MON, 2 for TUE and
3 for WED.

My form puts info into a table, adds a record.

I am wanting to build a report that uses my table as the control
source, but instead of displaying the stored value for the option
group item, I want it to display the actual TEXT...how can I do this?

So my report looks like this:

Thank you for selecting our <DAY HERE> service.

would read:
Thank you for selecting our Wednesday service.

but reads like this, because it is taking the value of the field:
Thank you for selecting our 3 service.

thanks for any help.
 
M

Mr. B

Take a look at the "Switch" function for this.

I will assume that you are using a query to return your recordset for your
report. In a new column of your query, add the following, customized to
reference your table name, field name and the appropriate number from your
group:

Weekday:
Switch([TableName]![FieldName]=1,"Monday",[TableName]![FieldName]=2,"Tuesday",[TableName]![FieldName]=3,"Wednesday",[TableName]![FieldName]=4,"Thrusday",[TableName]![FieldName]=5,"Friday")

If you have more options, just add additional conditions for each of your
options.

HTH
Mr. B
(askdoctoraccess dot com)
 

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

Similar Threads


Top