Full Version: Requery Sub-form
UtterAccess Forums > Microsoft® Access > Access Forms
Has anyone ever had a problem using requery on a sub-form where it's always one behind with the requery?

For example if I add "Dave Wilson" the requery will trigger after the update and the sub-form flashes and even if I step through the code, it's doing everything it's supposed to do but "Dave Wilson" does not show up in the sub-form, If I then add "Janet Burrows", the form requeries and "Dave Wilson" appears in the sub-form but not "Janet Burrows". Does that make sense, it's always one behind.

Has anyone else experienced this and know of any workarounds? I suppose could do a SQL statement and reset the sub-form's source each time after the update and that would fix it but it seems like I should not have to do all that when a simple requery should do the trick. Any assistance would be appreciated.

> if I add "Dave Wilson"

Can you be more descriptive of this process? How are you adding a person? Are you sure the data is being saved to a table before requerying the subform that displays the table data?

Hope this helps,

Duh...Sometimes the easiest things are the ones that prove the most troublesome. I just added a Save Record before the requery and that did the trick. Thanks, Dennis for jarring my head free.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.