Combobox

jakobt

Active Member
Joined
May 31, 2010
Messages
337
Having a form with an order from a order table.
I placed a combobox to lookup and enter the customerid in the order table.
Preferable I would like customer ID to be saved in the order table, but customer name to be looked up in the combobox.
The format of customerID field in the orders table is a number.
The sql in the combobox is select customer.name ; customer.id from customer and the control source is: customer

Now sometimes the customers are showing in the combobox. However sometimes they dont appear in the combobox? Often if I go to design view and back to form view the customers reappear in the combobox??
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
customer ID SHOULD be in the order.
The combo is a query from the customer table.
It may need refreshed if the customer is newly added.
CboBox.requery
 
Upvote 0
customer.name ; customer.id
reverse them and make the bound field the first one, set it's width to zero and then only the name will show but the id value is what gets saved.
control source is: customer
I don't see how this is possible. The control can be bound to a field, not a table. You said the field name is 'name', which btw is a reserved word and you should not use it for object names. See
 
Upvote 0

Forum statistics

Threads
1,214,592
Messages
6,120,433
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top