Display numeric value as text label

  • Thread starter Thread starter Lafayette
  • Start date Start date
L

Lafayette

Design a database for survey. In the input form, users are faced with a text
listbox, with choices "strongly agree", "somewhat agree", and so on. However,
the responses are actually stored as numeric values, say,

"strongly agree" = 7
"somewhat agree" = 6, and so on.

How shall I realize it? Appreciate the answer.
 
Thank you, Jeff. The sample database indeed accommodates the issue I have on
hand.

But since it's so sophisticated, I can't figure out how that actually works.

Does anyone have a concise anwer for my problem: display numeric value as
text labels. Or conversely, store texts as numbers.
 
Lafayette,
this is a very common thing to do. The usual way is to have combo box on the
form ( can also use a listbox).
The combo box has 2 columns, the 1st column is hidden and contains the
number corresponding to each choice.
The combo's row source is a query, table or a value list.
In your case you might have a value list if only a couple of choices. It is
easier to use a table if there are several choices.
So you might create a new table with 2 fields, the 1st field is a number,
long intereger, default value leave blank - name the field ChoiceNbr
the 2nd field is text, name it Choices. Save the table as tblSurveyChoices.
In the table enter your data with the numbers in ChoiceNbr and their
matching descriptions in Choices.
The combo box on your form has tblSurveyChoices as its row source.
Set up the combo box on your form so that when a user selects 'strongly
agree', the form stores the number 7 in the database.
This long description is only half of the process, you need to set up the
main table that records data in a way that in can store the number selected
in the combo box. This gives you the idea, but not all the info you need to
make it work. See the sample databases on ComboChoosesRecord.mdb (
beginner )
This illustrates how to have a combo box in which you can choose a value and
have that record appear in the form. at
http://www.rogersaccesslibrary.com/download3.asp?SampleName=ComboChoosesRecord.mdb
to see how this all works.

Jeanette Cunningham
 

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

Back
Top