Requery vs Split DB delay

hbrems

has no clue...
Local time
Today, 21:50
Joined
Nov 2, 2006
Messages
181
In a split database consider the following scenario.

I have a main form which is essentially a list of employees. Editing an employee takes place in a pop up dialog. When I close the dialog I'd like to update the data in my main form. I'm doing this by means of an event: Dialog.OnUnload will trigger a requery of the main form.

However, since my DB is now split, it takes just a bit longer to update the record in the back end. And also for the form to notice the changes. In other words, if I requery right after I close the edit form, it will be to soon for the main form to see the changes.

I'm looking for tips that might help resolve this problem.
 
Seems like using stored queries iso select statements for my main form is doing the trick.
 
Or not... I was a bit too optimistic it seems.
 
you could do it this way. this will open the popup, and wait for it to close before continuing.

Code:
docmd.openform "popupform"
while isopen("popupform")
  doevents
wend
me.requery

you need this function

Code:
Function IsOpen(strName As String, Optional objtype As Integer = acForm)
  IsOpen = (SysCmd(acSysCmdGetObjectState, objtype, strName) <> 0)
End Function
 

Users who are viewing this thread

Back
Top Bottom