refresh combobox

G

golan

hello, i have a combobox(1) witch is linked to a query from table1 witch is
influenced form another combobox(2) witch is linked from table1 ( both of
them are in the same form). if i put a data by mistake data in combobox(2) it
is from same reason doesnt change the data in combobox(1).
how do i make the combobox(1) refresh the data from the query after the data
change in combobox(2).

thanks
 
A

Al Campagna

golan,
I'm assuming that the query behind cbo2 uses a value from cbo1 to
filter the records cbo2 returns.
You need to Requery cbo2 on the AfterUpdate event of cbo1.
Private Sub cbo1_AfterUpdate()
Me.cbo2.Requery
End Sub
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

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