Option Groups

J

Jen

Hi.....I've created an option group on a form with 6 possible choices. It is
bound to a field in a table and seems to be working fine except when i
generate a report from this table, it prints the numerical value from the
option field but i'd prefer the text. Any ideas how to get around this guys ?

Thanks,
Jenny
 
L

Larry Daugherty

In the query on which your Report is based, create a new field
something like

OptionName: =OptionNameFunction(OptionField)

In a standard module, create a Function Procedure
OptionNameFunction(OptionField as integer) as String

in that function, use a SELECT .... CASE procedure to assign the
appropriate string for the value returned in OptionField.

In your Report, where you currently use OptionField (which returns an
integer) use your new field OptionName.

HTH
 
Top