Dynamic Combo Boxes

cross5900

Blarg!
Local time
Today, 09:03
Joined
Mar 24, 2006
Messages
92
I searched these forums but I did not see anything that was helpful in the matter, so if there is a thread like this please direct me to it and disregard this.

I have a combo box that houses the names of dealerships, this is bound to a table.

A user does have the ability to add a new dealership at all times to the combobox by simply typing it in.

The problem, the only way the new dealership appears in the list is if you close the form and reopen (which makes sense)

What I need to do is dynamically update this list so that anytime there is a new dealership it will automatically show up in the drop-down list.

Would a union query be the best way to go about this?
 
ignore me on the union query bit, I got myself confused with that and a previous project.

I know that it's main function is to combine multiple tables.
 
After a user has added a name, try issuing this command:

DoCmdRunCommand accmdSaveRecord

Then do a requery of the combo box.

HTH
 
cross5900,

Have a look at my attached sample it will;

Allow your users to add a dealership (In the sample its called firm) , ask them to confirm the addition, requery the combo and return them to their current record.

Have a look at the code behind the form.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom