Output field as a text

D

dave117

Hello,
I am new to access 2007, and need to do the following
I have created a form and in there is a selection of check boxes.
Simply put for gender if they are male check here felame check here trans-
here etc.
I am trying to generate a report that lists by the id number as a text string
but I am getting out the option field output number 1, 2, 3, 4 etc
How do I get this to be the text value, not the field output number
Please keep it simple as I am new!!
thanks
 
K

KenSheridan via AccessMonster.com

It sounds like your check boxes are options in an option group bound to a
numeric column in the form's underlying table. If so you should create a new
table Genders with two columns GenderID (integer number) and Gender (text).
Index both columns uniquely. In the first column enter the number which
corresponds to the values in your existing table assigned by the option group
in your form when you select an option, and in the second column enter the
corresponding text value, e.g.

1 Male
2 Female
3 Trans
<and so on>

Create a relationship between the new Genders table and the existing table on
the GenderID column and the relevant gender column in your existing table.
Enforce referential integrity.

Base your report on a query which joins the two tables on the two columns by
which the tables are related (Access will probably create the join
automatically when you add the tables in query design view). Include the
Gender column from the genders table in the query's output and bind a text
box to this in your report. You'll then see the text value which corresponds
to the numeric value in your existing table.

Ken Sheridan
Stafford, England
 
D

dave117

KenSheridan via AccessMonster.com wrote on 05/12/2010 07:31 ET :
It sounds like your check boxes are options in an option group bound to a
numeric column in the form's underlying table. If so you should create new
table Genders with two columns GenderID (integer number) and Gender (text).
Index both columns uniquely. In the first column enter the number which
corresponds to the values in your existing table assigned by the optio group
in your form when you select an option, and in the second column enter the
corresponding text value, e.g.

1 Male
2 Female
3 Trans
<and so on>

Create a relationship between the new Genders table and the existing tabl on
the GenderID column and the relevant gender column in your existing table.
Enforce referential integrity.

Base your report on a query which joins the two tables on the two columns by
which the tables are related (Access will probably create the join
automatically when you add the tables in query design view). Include the
Gender column from the genders table in the query's output and bind a text
box to this in your report. You'll then see the text value whic corresponds
to the numeric value in your existing table.

Ken Sheridan
Stafford, England
Thank you sir
I will try it
 

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

Top