Is there any way to delay form closing?
My problem is the following: I have a form that I occasionally have to alter but that form needs to update a total row (worksheet view). Then I have this code to close that form and open another:
HTML Code:
Private Sub Exit_Click()
On Error GoTo Err_Exit_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Clients"
stLinkCriteria = "[ID]=" & Me![ID_Client]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Exit_Click:
Exit Sub
Err_Exit_Click:
MsgBox Err.Description
Resume Exit_Exit_Click
The issue is that I think that if I can delay the form closing , I can set something like
HTML Code:
Me.ReportField_Total.SetFocus
to force the changes update..
Something like:
HTML Code:
Something here to delay 5 seconds
Me.ReportField_Total.SetFocus 'To update the form in worksheet view...
DoCmd.OpenForm stDocName, , , stLinkCriteria
Hope this can may sense to you guys...
Thanks!