Storing combobox values in datasheet

arashii

Registered User.
Local time
Today, 00:13
Joined
Feb 12, 2007
Messages
22
Hi, I'm new to the forums and Access in general :o .

I just have a question regarding storing a selected combobox value in the datasheet. I don't have VB coding experience so I'm just using mostly the wizards in my database (Access 2003).

In my form, I created a combobox in Design view, then selected the field/table that will provide the values. Then, I selected that same field/table as where I will store the value selected in the combobox.

The combobox works fine in the sense that it does provide the list of values I want to put in the datasheet, but after I save the record, the value that appears in the datasheet is the INDEX of the value and not the value itself.

For Example:

Postal codes field (source of combobox list and field to store selected combobox values)
143
873
999

If I selected 999: In the new record created, the value for postal code is 3 instead of 999. How can I make it so that it stores the actual code value and not its index? (If possible, without VB coding ~_~ but if it can't be helped then sure :o ).

Thank you so much, I'm really stumped here :confused: .
 
arashii said:
Hi, I'm new to the forums and Access in general :o .

I just have a question regarding storing a selected combobox value in the datasheet. I don't have VB coding experience so I'm just using mostly the wizards in my database (Access 2003).

In my form, I created a combobox in Design view, then selected the field/table that will provide the values. Then, I selected that same field/table as where I will store the value selected in the combobox.

The combobox works fine in the sense that it does provide the list of values I want to put in the datasheet, but after I save the record, the value that appears in the datasheet is the INDEX of the value and not the value itself.

For Example:

Postal codes field (source of combobox list and field to store selected combobox values)
143
873
999

If I selected 999: In the new record created, the value for postal code is 3 instead of 999. How can I make it so that it stores the actual code value and not its index? (If possible, without VB coding ~_~ but if it can't be helped then sure :o ).

Thank you so much, I'm really stumped here :confused: .

More than likely you have the combo column bound to the index and not the Data. Make sure that the INDEX is the first column and the DATA is the second column. then change bound to 1. That should solve the problem.
 
Wiz47 said:
More than likely you have the combo column bound to the index and not the Data. Make sure that the INDEX is the first column and the DATA is the second column. then change bound to 1. That should solve the problem.
Mmmm, slight error there Wiz47 - that should be "change bound to 2" as the bound column is not zero based.
 
boblarson said:
Mmmm, slight error there Wiz47 - that should be "change bound to 2" as the bound column is not zero based.

You're right, I was tired.
 
Hi, thanks Wiz47 and boblarson :D :D :D . Works perfectly now! Ty so much!
 

Users who are viewing this thread

Back
Top Bottom