Refresh Navigation Subform on close

keith701a

Registered User.
Local time
Yesterday, 23:32
Joined
Aug 9, 2016
Messages
38
I need a navigation subform to refresh when an update form is closed. The subform lists open projects and it does not update if a project is closed out from the update form unless F5 is keyed. The navigation form is "Nav_Form" and the subform is "Pending_Working."

I've added Forms!Nav_Form!Pending_Working.Requery to the VBA on close event of the update form, but that didn't work. Any ideas on how to get it to work? Thanks in advanced.
 
I would have suggested what you have done - so what does 'didn't work' mean? what do you expect to happen? what actually happens? What is the recordsource to the subform?
 
I would have suggested what you have done - so what does 'didn't work' mean? what do you expect to happen? what actually happens? What is the recordsource to the subform?

The subform does not refresh. The subform should refresh and stop displaying projects that are no longer open. The record source for the subform is a query named "open." This query filters out projects that have a "null" completed date.
 
re recordsource, sorry I meant the sql. I appreciate it may work when you hit F5 with presumably the navigation form having the focus, but it may be the query is still returning the same values so doesn't appear to refresh.

As a little test, suggest put a msgbox just before and after your requery in the form close event to confirm the code is running. Also pause the code at that point and run the query independently to check it returns the right result
 

Users who are viewing this thread

Back
Top Bottom