I am using this code to force an entry in CHKNUM if PDCHK is entered. Everything is fine till I ok that a check number must be entered. Then I receive the run-time error "You must save the field before you execute the GoToControl Action.
I'm probably missing the obvious but am stuck.
Thanks,
Bill
Private Sub CHKNUM_BeforeUpdate(Cancel As Integer)
If Not IsNull(PDCHK) Then
If IsNull(CHKNUM) Then
MsgBox "You must enter a check number", vbInformation
DoCmd.CancelEvent
DoCmd.GoToControl "CHKNUM"
Exit Sub
End If
End If
End Sub
I'm probably missing the obvious but am stuck.
Thanks,
Bill
Private Sub CHKNUM_BeforeUpdate(Cancel As Integer)
If Not IsNull(PDCHK) Then
If IsNull(CHKNUM) Then
MsgBox "You must enter a check number", vbInformation
DoCmd.CancelEvent
DoCmd.GoToControl "CHKNUM"
Exit Sub
End If
End If
End Sub