Combo Box Value List

E

emb4r

Hi,

I'm designing a form that will be used to enter data from surveys. I'd like
to create drop-down lists in the form for questions with categorical answers
(for instance, your level of education: none, high school, college,
graduate). I'm wondering if I'd be able to have a drop down list of text
options (i.e. none, high school, college, graduate) that will output to the
table as numerical data (none=1, high school=2, etc). Is this possible to do
in Access 2007?

Thanks!
 
A

Al Campagna

emb4r,
Create a 2 column combo box...
EduID Education
1 None
2 High School
3 College ....... etc....
Bind the combo field to your EduID field.
Name the Field EduID
Set No of Columns to 2
Set the column widths to 0";1 " ' hides first column

What this does is, allow the user to select by Education.
The combo will display the Education, but really store the EduID
in the bound EduID field.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
T

Tom van Stiphout

On Fri, 1 May 2009 02:54:01 -0700, emb4r

Of course. Your database design will likely have a table tblAnswers
similar to this:
AnswerID autonumber
QuestionID long int FK
AnswerValueID long int FK
CandidateID long int FK

The AnswerValueID would come from the AnswerValues table:
AnswerValueID long int PK
AnswerValue Text(50)
There is an enforced relationship between the two tables.

When entering answers in a form bound to the first table,
AnswerValueID would be a dropdown, with a RowSource bound to a query
like this:
select AnswerValueID, AnswerValue from tblAnswerValues order by
AnswerValue
This dropdown will have ColumnCount=2, ColumnWidths="0;1",
BoundColumn=1
That way humans see the text, but you're saving the number for the
benefit of the database.

Btw, wouldn't it be great if these surveys were entered not on paper
but in some kind of form, be it Access or Online?

-Tom.
Microsoft Access MVP
 

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