So I mave a form called "frmPropertyHistory" with a textbox "findGuest". When I enter a string in this textbox, another form opens "frmFindGuest" with a listbox "SearchResults" displaying the matcing results. This is the query in the listbox Row Source:
"SELECT [qryFindGuest].[ID], [qryFindGuest].[PropertyName], [qryFindGuest].[GuestName], [qryFindGuest].[CheckInDate], [qryFindGuest].[CheckOutDate], [qryFindGuest].[ReservationDate], [qryFindGuest].[Status] FROM qryFindGuest ORDER BY [CheckInDate]; "
I have now added a double click even on this listbox to open the selected record to edit it on a pop up form. This works well as I can open the pop up form and edit the selected record. However, when I close the pop up form, I'd like for the listbox to be updated so it shows the updated data.
I have tried to requery the listbox from the pop up form on close event "[Forms]![frmFindGuest]![SearchResults].Requery" but this does not seem to do it.
I have also tried to requery the listbox using the on current event (Me.Requery) but that doe snot seem to do it either.
What am I missing?
mafhobb
"SELECT [qryFindGuest].[ID], [qryFindGuest].[PropertyName], [qryFindGuest].[GuestName], [qryFindGuest].[CheckInDate], [qryFindGuest].[CheckOutDate], [qryFindGuest].[ReservationDate], [qryFindGuest].[Status] FROM qryFindGuest ORDER BY [CheckInDate]; "
I have now added a double click even on this listbox to open the selected record to edit it on a pop up form. This works well as I can open the pop up form and edit the selected record. However, when I close the pop up form, I'd like for the listbox to be updated so it shows the updated data.
I have tried to requery the listbox from the pop up form on close event "[Forms]![frmFindGuest]![SearchResults].Requery" but this does not seem to do it.
I have also tried to requery the listbox using the on current event (Me.Requery) but that doe snot seem to do it either.
What am I missing?
mafhobb