Use Save Button in Mainform from Subform

tafnuef1

Registered User.
Local time
Today, 03:33
Joined
Apr 22, 2010
Messages
43
Ok, I have a save buttong (next record) in my mainform (DIQA). I want to be able to click that save button after all records in both the mainform (DIQA) and subform (Audit_Error_Subform) is complete. but I get an error since my control in the subform has the focus.

This is what I have done can someone tell me what I have done wrong.

Private Sub Save_Record_Click()
On Error GoTo Err_Save_Record_Click

Me.DIQA.SetFocus

DoCmd.GoToRecord , , acNext
Me.Batch_Number_ID.Enabled = True
Me.Document_Count.Enabled = False
Me.Date_of_Audit.Enabled = False
Me.Document_Type.Enabled = False
Me.Prepper_Name.Enabled = False
Me.Indexer_Name.Enabled = False
Me.Audit_Errors_Subform.Form.Enabled = False
Me.Audit_Errors_Subform.Form.Prepper_Error.Enabled = False
Me.Audit_Errors_Subform.Form.Indexer_Error.Enabled = False





Exit_Save_Record_Click:
Exit Sub
Err_Save_Record_Click:
MsgBox Err.Description
Resume Exit_Save_Record_Click

End Sub
 

Users who are viewing this thread

Back
Top Bottom