Change the 'Value' (number) to its labeled value in Access.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to create a report in Access that will be grouped on an
'OptionGroup' field. Would like to find a way to reveal the corresponding
label to the option group number, in my report.
 
I'm trying to create a report in Access that will be grouped on an
'OptionGroup' field. Would like to find a way to reveal the corresponding
label to the option group number, in my report.

For just a few options?
Use an unbound control.
=IIf([OptionName] = 1,"LabelText1",IIf([OptionName] =
2,"LabelText2","LabelText3"))

For many more options, you could also use the Choose function in the
control source, or Select Case or If .. Then .. else .. End If in a
VBA function.
= FunctionName([OptionGroupName])
 
One way is to create reference table with the numbers and labels and then
join it in your query.
 
Thank you for the advice. I'll give it a try.

Bill

fredg said:
I'm trying to create a report in Access that will be grouped on an
'OptionGroup' field. Would like to find a way to reveal the corresponding
label to the option group number, in my report.

For just a few options?
Use an unbound control.
=IIf([OptionName] = 1,"LabelText1",IIf([OptionName] =
2,"LabelText2","LabelText3"))

For many more options, you could also use the Choose function in the
control source, or Select Case or If .. Then .. else .. End If in a
VBA function.
= FunctionName([OptionGroupName])
 

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

Back
Top