listbox query not changing

K

Kou Vang

I have a listbox1 in which the rowsource is bound to a query. The query has
a criteria that is based off another listbox2 on the form. When the form
goes to the next record I expect the listbox1 rowsource to change since the
criteria has changed based off listbox2. It is only invoked when I click the
properties of listbox1 and view the query and run it. How do I invoke the
query for the listbox1 by moving to the next record, thus changing listbox2?
In theory, since my query is based off listbox2, shouldn't the query change
and update listbox1? Thanks.

Kou
 
K

Klatuu

You need to requery ListBox2 in two places.
1. In the After update event of ListBox1
Me.ListBox2.Requery
2. In the Form Current event

If Not Me.NewRecord Then
Me.ListBox2.Requery
End If
 

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