Can I create a drop list with text values to chose from but numeri

L

lizeas

Hi,

I am trying to create a drop list that when you pull it down it wil list
words of the type of treatments we give in our research. Once the words are
selected though I want a number value to be place in the field rather then
the text. The reason is all of the treatments we give are coded, and we want
the code value which is a number to display but would like the words to show
up to make date entry easier.

thanks
 
N

Nikos Yannacopoulos

I'll assume you have a table called tblTreatments, with fields:
T_ID (numeric, PK)
Treatment (text)
etc.

so you want to see Treatment values in the combo, but store the related
T_ID values in the bound field. How to do it: open the form in design
view, and display the properties window (with the combo selected). On
tab Data, put the cursor next to Row Source and click on the little
button taht appears on the right, to invoke the query builder. In the
query design view, add the table tblTreatments, and the two fields T_ID
and Treatment; close the query design view and confirm to save the SQL
statement. Back in the form design, go to the Format tab of Properties
window, and set the Column Count property to 2, and the Column Widths
propert to 0;2 (or 0;whatever number, as long as the first one is 0 so
the first column doesn't show!). Now you should only see the text, but
save the number.

HTH,
Nikos
 

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