Requery Subform

MattioMatt

Registered User.
Local time
Today, 16:54
Joined
Apr 25, 2017
Messages
99
Hello,

I'm currently having an issue in getting a list box to requery once and edit/update has been made to a record.

I'm using a subform 3 levels deep - I currently have a main form called frmMain (which is a Navigation form) frmMaintainLists (NavigationSubForm) then finally an unbound subform called frmPCUList.
1. frmMain
2. frmMaintainLists
3. frmPCUList

on frmPCUList there is a listbox that displays the SearchResults as featured from the dynamic search on these forums.
Additionally on this form PCUList form there are 3 buttons:
1. Add New (opens a pop up with a text box to enter a new name with save and cancel buttons)
2. Edit (opens pop up to edit existing record with save and cancel buttons)
3. Delete (deletes record)

Oddly the delete button is working and re-querying the listbox when a record has been deleted.
Additionally Add New re-queries when the user presses save.

The on I am having an issue with is the Edit button, it doesn't re-query no matter what I do.

I'm referring to the re-query as the following under an onclick event following on from the save/delete commands.
Code:
[Forms]![frmMain]![NavigationSubform].Form![subfrmMaintainLists].Form![SearchResults].Requery

I'm struggling to understand why it works 2 out of the 3 forms but not the edit form.. any suggestions?
 
Is the Navigation form one of the inbuilt Navigation forms? If so they have a strange way of handling the forms that you switch to - and as such they aren't referred to in the usual way.

Have a look here https://www.access-programmers.co.uk/forums/showthread.php?t=247256 for some possible insight

Most of us don't use the inbuilt Navigation forms as they are a real pain to reference
 
Thanks for your reply minty.

It seems the issue was relating to an if statement I had wrapped around it. I fixed the issue in this code and all worked correctly.

Thanks so much for your help!
 

Users who are viewing this thread

Back
Top Bottom