Continuous form wont requery properly

P Zero

Registered User.
Local time
Today, 23:34
Joined
Mar 15, 2006
Messages
41
I have a continuous form (FormA) which shows records from TableA. There is a button on FormA which opens FormB. FormB allows a record to be added to TableA. On closing FormB, FormA should requery to show the most recent addition to TableA. This does not happen though, it is always a record behind, unless I close and reopen the form.

I'm using;

Forms![FormA].Requery

on my close button on FormB.

Any ideas? I have done a search but cant find a solution.
 
Last edited:
Try the following: Forms!FormA.Form.Requery

Hope this helps
 
It still only requeries to show the previously added revision. It wont update to include the newest record. Very confusing :confused:
 
Try adding the code to the onClose event of FormB or the onGotFocus event of FormA
 
Bigby3 said:
Try adding the code to the onClose event of FormB or the onGotFocus event of FormA
I moved the code to the OnClose event of FormB and it works now! Any idea why that is? Seems a bit wierd to me? Well I suppose it is Microsoft :rolleyes:
 
I'm not 100% positive as I am pretty new to Access programming, but I think that the table isn't actually updated until the form closes due to record locking issues. If the form is still open on a record being edited, other forms only have access to the unedited version. And form B doesn't actually close and unlock the record until after the close button event is completed.
 
That makes sense. Thanks for your help and your explanation.
 

Users who are viewing this thread

Back
Top Bottom