Listbox refresh??

  • Thread starter Thread starter GasMan
  • Start date Start date
G

GasMan

Hi,

I'm trying to show a list of attendees in a listbox on a form, where
the attendees are linked by a common field, this field is Practice_ID.

How do I/or where do I, set code so that on each record change of the
master record, do I see those records attached to the master record
which is called Practice_Admin, the child file being Attendees.???

TIA
Please remove obvious from email address if emailing.
 
Hi,
First, create a query that returns *all* attendees and use it to populate the listbox.
Then, add the Practice_ID field to the query and set the criteria to:
Forms!yourForm!ControlThatHasPrcatice_ID

You don't have to have this field in the results if you don't want to.
You can just use it to limit the results.

And then in the form's Current event requery your listbox:
Me.yourListBox.Requery

that's it.
 
And then in the form's Current event requery your listbox:
Me.yourListBox.Requery

That was what I was looking for. Thank you.
I had the query, but it was not changing. The code above should change
that.
Please remove obvious from email address if emailing.
 
Back
Top