how to refresh/requery a list box on a form

PhoenixCouriers

Registered User.
Local time
Today, 01:05
Joined
Feb 24, 2011
Messages
32
Hi all,

I have a list box on a form called "list4" on a form called "Main"

On the main form is a command button that opens another form called "AddNewBooking" to add further records.

This will not refresh/requery unless i close the main form and reopen it.

I have tried me.list4.requery on the current event of the main form but no success ?

what am i doing or missing

thanks
 
I'd add code to the second form's on close event. Do an if check to see if the main form is open, if so, perform a requery.

Code:
If CurrentProject.AllForms("YourFormName").IsLoaded Then
    Forms!YourFormName!YourControlName.Requery

I know that works for comboboxes, I'm assuming that it works the same for listboxes.
 

Users who are viewing this thread

Back
Top Bottom