how can i use combo box to update 2 fields

John thomas

Registered User.
Local time
Today, 14:00
Joined
Sep 4, 2012
Messages
206
I use a combo box to add customers to my orders table via a form
I notice the orders table customer id is not updated
IS this OK?
If not how do i also update this field from my form .I want to see the customers from the combo box
 
Need more info on how you are accomplishing this. Can you be more specific? How is your combo box set up?

You should make sure your combo box control source property is set to the customer ID field of your Orders table AND the rowsource of your combobox includes the customer id column. The combo box must also be set up so that your bound column is the number of the column that is the customer ID.
 
Last edited:
Many thanks for that
I am very new at this .What is the control source property
What is the bound coloumn
Allso i find if i hide the id column as recommended i dont get to see the customers name just id.s
Sorry to be so dim
 
If you go to design view of your form and then double-click on the combo box you will come up with a properties window. The combo box has a few properties. One is the control source property. This is the field from your table that the combo box is bound to. It sounds like you need it bound to the Orders.Customer id column. Your combo box also has a property called "Bound column" (look in the Data tab). Your Rowsource property (also a property of the combobox) found also in the datatab should have something like this in it: SELECT CustomerID, CustomerName from Customers. Your bound column should be = 1. Your columncount property should be = 2 and your columnwidths should be = 0;1. See screenshots below. :)
 

Attachments

  • comboboxproperties1.jpg
    comboboxproperties1.jpg
    47.8 KB · Views: 135
  • comboboxproperties2.jpg
    comboboxproperties2.jpg
    55.7 KB · Views: 116

Users who are viewing this thread

Back
Top Bottom