R
Robert_L_Ross
Here is my problem...
I am trying to code two ways of closing a form:
One way cancells the existing record, closes the form and returns to the
previous form.
The second way closes the form and requeries the previous form.
The basis for this decision is the [date finalized] field on my form. Here
is the code I'm trying:
Dim SearchBatchID As String
SearchBatchID = Forms!CurrentAuditStatusIncompleteAudits!BatchID
If Forms!Audits![Date Finalized] Is Null Then
SendKeys "{ESC}{ESC}", False
DoCmd.Close acForm, "Audits", acSaveNo
Else
DoCmd.Close acForm, "Audits", acSaveNo
DoCmd.Requery ""
Me![BatchID].SetFocus
DoCmd.FindRecord SearchBatchID, , , , False
End If
Any ideas?
I am trying to code two ways of closing a form:
One way cancells the existing record, closes the form and returns to the
previous form.
The second way closes the form and requeries the previous form.
The basis for this decision is the [date finalized] field on my form. Here
is the code I'm trying:
Dim SearchBatchID As String
SearchBatchID = Forms!CurrentAuditStatusIncompleteAudits!BatchID
If Forms!Audits![Date Finalized] Is Null Then
SendKeys "{ESC}{ESC}", False
DoCmd.Close acForm, "Audits", acSaveNo
Else
DoCmd.Close acForm, "Audits", acSaveNo
DoCmd.Requery ""
Me![BatchID].SetFocus
DoCmd.FindRecord SearchBatchID, , , , False
End If
Any ideas?