Combo Box

PShiers

Registered User.
Local time
Today, 21:43
Joined
May 2, 2009
Messages
26
Wonder if someone can confirm if the following is possible, and if yes then how to do it.
Backgroung: I've setup a table call 'Towns' to how hold list of all towns, and in the customer table the town in the customer address is a key e.g 20 which is e.g. 'Dover' in the Town table (20 = Dover). So I create a query that links key to the value so the what displays is 'Dover' - basic stuff.

Problem is that I what the Town field on the customer form to be a combo box, for two reasons:
1. If 'Dover' is wrong user can select from list of Towns and right Town - And want the key of the new town to save to Customer table
2. If setting up new customer can select town.

I'm OK with reason two, but how do I get the combo box that is populated from Table 'Towns' to display the 'Town' of an existing customer, so it can be change if needed.

Hope this make sense

Many thanks
 
Base your form just on the customer table (not a query).

Add your combobox - in the properties set Column Count = 2, and Column Widths = 0.

Set the ControlSource of the combo to the key field in the Customer table

Set the RowSource of the combobox to table Towns.
 
Re 5. if you just enter 0 then the second column will be as wide as the width of the combo.

If you specify 2 then the width of the dropdown list may not match that of the combo which can look a bit hinky. Test and see what suits you best.
 
Base your form just on the customer table (not a query).

Add your combobox - in the properties set Column Count = 2, and Column Widths = 0.

Set the ControlSource of the combo to the key field in the Customer table

Set the RowSource of the combobox to table Towns.
Excellent, Thanks for the help
 

Users who are viewing this thread

Back
Top Bottom