Option group

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
 
T

Tom Wickerath

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
 
K

KARL DEWEY

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","")
 

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