This is what I have on my form after update event:
I want it to give the user the opportunity to put a value in txtPrintNumber, but NO matter where I put the setfocus, it doesn't work.
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Not IsNull(Me.chkMathdata) And IsNull(Me.txtPrintNumber) Then
'Me.txtPrintNumber.SetFocus
MsgBox "You must enter a valid Print Number, since you are supplying Math Data"
Cancel = True
Me![txtPrintNumber].SetFocus
End If
End Sub
I want it to give the user the opportunity to put a value in txtPrintNumber, but NO matter where I put the setfocus, it doesn't work.
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Not IsNull(Me.chkMathdata) And IsNull(Me.txtPrintNumber) Then
'Me.txtPrintNumber.SetFocus
MsgBox "You must enter a valid Print Number, since you are supplying Math Data"
Cancel = True
Me![txtPrintNumber].SetFocus
End If
End Sub