Populate unbound combo box on form open

G

Guest

I have an Access 2000 form based on Table1. On this form are two unbound
combo boxes; combobox1 references Table2 and populates combobox2, which
references Table3. All is working fine with the combo boxes referencing each
other and the record selected for the form; however, when the form opens, the
first record in Table1 is selected but combobox1 and combobox2 do not show
the current record information. All 3 tables are referencial to each other.
How can I populate combobox1 and combobox2 when the form opens?

Thank you in advance,
Al
 
P

PC Datasheet

Put the following code in the form's Current event:
Me!nameOfCombobox1.Requery
Me!nameOfCombobox2.Requery
 
G

Guest

Thank you, I tried that but it still doesn't work. The fields appear empty
unless you click on the combo's down arrow.
 
P

PC Datasheet

The only way to get a value in Combobox1 is where the value of Combobox1
depends on one of the bound controls on your form. You would then need an
expression like the following in the form's current event:
Me!Combobox = <Something> Me!NameOfBoundControl
 

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