Hi Tim,
The simplest way to do this is on the "Close" event of the form you use to
add/update the table used as the recordsource for the listbox put:
Private Sub Form_Close()
if isloaded("frmListBox") = True then
form_frmListBox.lboRecords.requery
endif
end sub
"IsLoaded" is a standard function that checkes to see if the form passed in
is open:
Public Function IsLoaded(ByVal strFormName as _ String) as Integer
Isloaded = Application.CurrentProject.AllForms _(strFormName).isloaded
End Function
Regards
Barry
"Tim Graichen" <Tg*******@neo.rr.com> wrote in message
news:lt*******************@fe2.columbus.rr.com...
Hi,
I have an unbound listbox in my main form that is used for reference only.
If I want to add a record to the table that this list box displays, I open
a seperate form to enter a new record to the table.
What I would like, is for the list box in the main form to refresh after
the new record is saved. Currently, I need to close and reopen the main form
that contains the listbox in order to see the new record.
Thanks
Tim