Inserting Hidden Value From Combo Box into Table

G

Guest

I have a form which is used to enter information on a vehicle. The Form
includes a combo box which populates itself using a table called
Supplier_Details and has two columns (in the combo box) column(0) =
Supplier_Id (which is hidden) and Column(1) Supplier_Name. The user chooses
which supplier and then fills in the rest of the form and clicks a button to
save the record for that vehicle. The only trouble i have is that when i
look at the Vehicle_Detail table, the value entered into the Vehicle_Supplier
column is the value for the Supplier_Name and NOT the Supplier_Id -
How do i specify that the value to be saved from the combo box should be the
Supplier_Id and not the Supplier_Name?

Any Quick Solution would be greatly apprieciated!

Thanks in advance!
 
T

tina

first, make sure that the data type of the Vehicle_Supplier field in the
Vehicle_Detail table matches the data type of the Supplier_Id field in the
Supplier_Details table.

next, make sure that the Vehicle_Supplier field in the Vehicle_Detail table
is *not* a Lookup field. if it is, change it back to a "regular" field by
clicking on the field in the table's Design view, then clicking the Lookup
column in the Field Properties section at the bottom half of the screen, and
changing the DisplayControl property to Textbox.

if that doesn't correct the problem, open the form in Design view and click
on the combobox control to select it. in the Properties box, look at the
BoundColumn property. make sure the property is set to 1. and yes, that is
the correct setting, because this property does *not* match the IndexValue
of the columns, which is zero-based.

hth
 

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