How to assign numerical values to text options in unbound combo boxes? (1 Viewer)

akerenyi

Registered User.
Local time
Today, 11:17
Joined
Nov 22, 2011
Messages
14
Hi there,

I am developing a medical patient database for out research group. We have agreed to store numerical values in the table to help running statistics later. however, in the input form, we have to give text options.

For example, I would like to create a form to save maternal medical history. The first field is gestational diabetes. This field can have the numerical values 1, 2 and 3, which would mean:
1: Yes
2: No
3: No data.

Now, I have managed to create a combo box with the Yes/No/No data options, I just don't know how to write a script/code, which would assign the numerical values to the options and save the appropriate number to the appropriate field in the table.

Sorry, if I'm being impossibly amateur:)

Thanks,
Aron
 

bob fitz

AWF VIP
Local time
Today, 10:17
Joined
May 23, 2011
Messages
4,721
Hi
You could try this:

Set the Control Source of the combo box to the name of the field in the table that is to store the number.
Set the Row Source of the combo box to: 1;"Yes";2;"No";3;"No Data"
Set the Row Source Type of the combo box to: Value List
Set the Column Count of the combo box to: 2
Set the Column Widths of the combo box to: 0cm;1.5cm
 

akerenyi

Registered User.
Local time
Today, 11:17
Joined
Nov 22, 2011
Messages
14
Thank you very much:)
 

Users who are viewing this thread

Top Bottom