listbox filtering in subform

G

Guest

Hello. I have a mainform that has a subform on it. Both are linked
properly. On a the mainform there is a combo box that is used for selecting
the mainform record. The subform changes accordingly. But on the subform I
have a listbox that is used to display all the records associated with the
selected mainform record. The listbox displays the number of records an even
the after_update event works. What my issue is has to do with the changing
of the records. By that I mean when I first try it out the listbox in
subform matches correctly. When I change the mainform record, the subform
works, but the listbox does not change to show all the corresponding records
of the newly selected mainform record. It stays the same. I have the
"where" clause indicating it to match the ID of the mainform.

Can anyone enlighten me as to why the listbox in the subform does not change?

Thanks for any assistance.
.... John
 
T

tina

the listbox on the subform is not linked to the main form, so no automatic
update can occur. just add code to the *main form's* Current event procedure
to requery the listbox, as

Me!SubformName.Form!ListboxName.Requery

hth
 

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