Here is the code... where i put the astrix is where i want the other code to go to open up the duplicated record instead...
Private Sub Command11_Click()
Dim iEmpId As Long
If IsNull(Me.Emp_ID) Then
If (MsgBox("Not Enough Data!" & vbCrLf & _
vbCrLf & "Please enter a different ID.", _
vbOKOnly, "Duplicate Employee") = vbOKOnly) Then
Cancel = True
End If
End If
If IsNull(Me.DailyDate) Then
If (MsgBox("Not Enough Data!" & vbCrLf & _
vbCrLf & "Please enter a different date.", _
vbOKOnly, "Duplicate Employee") = vbOKOnly) Then
Cancel = True
End If
Else:
iEmpId = DCount("Emp_ID", "tblEmployeeDaily", "Emp_ID = " & Me.Emp_ID & " And DailyDate=#" & Me.DailyDate & "#")
If iEmpId <> 0 Then
If (MsgBox("An entry for this date already exists. " & vbCrLf & _
vbCrLf & "Would you like to edit the record?", _
vbOKCancel, "Duplicate Employee") = vbOK) Then
****************Put record Code Here*********************
End If
Else:
DoCmd.Save acForm, "EmployeeDaily"
End If
End If
End Sub