I thought this was going to be easy since I know how to filter a parent form and a sub form by using form clone. But unfortunately, this appear to be challenging where do I go wrong here:
Code:
Private Sub txtAuditControl_AfterUpdate()
On Error GoTo Err_Handler
Dim db As DAO.Database
Set db = CurrentDb
Me.Filter = "EmpID = " & Me!CboEditStaff.Value & ""
Me.FilterOn = True
Dim Records As DAO.Recordset
Set Records = Me![frmEmployees].Form.RecordsetClone
If Records.RecordCount > 0 Then
Records.MoveFirst
While Not Records.EOF
Records.Edit
Records.Update
Records.MoveNext
Wend
End If
Records.Close
Exit_txtAuditControl_AfterUpdate:
Exit Sub
Err_Handler:
MsgBox Err.Number & Err.Description, vbExclamation, "Error"
Resume txtAuditControl_AfterUpdate
End Sub