Option group

  • Thread starter Thread starter jeremy0028
  • Start date Start date
J

jeremy0028

On a form i have an option group called male female

when i generate the report i want to display an x under the column head
male/female instead of 1 2

any ideas.

I'm a novice please explain clearly
 
Hi Jeremy,

What would an "x" denote under the column head of male/female? Perhaps "x"
chromosome? :-)

You can use nested IIF functions in the control source for a textbox on a
report. For example, if the name of the field is "sex", then you could use
this:

=IIf([Sex]=1,"Male",IIf([Sex]=2,"Female","Unknown"))

One requirement for this to work: The name of the textbox *MUST* be
different from the name of the field.


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

On a form i have an option group called male female

when i generate the report i want to display an x under the column head
male/female instead of 1 2

any ideas.

I'm a novice please explain clearly
 
Replace [Sex] with your field name in the query for the report.
Add two columns to your query that you open in design view.

Male: IIf([Sex]=1,"X","")

Female: IIf([Sex]=2,"X","")
 
Back
Top