S
Singinbeauty
Alright, I am trying to drive myself mad with this. Please check the
following code and, if you can, tell me why I can't get the focus to stay on
the field 'New Orders'. It just goes to the next field.
What I need to do is if the salesperson leaves a field blank the msgbox will
pop up telling them to enter a value. After hitting retry or cancel the
cursor will stay on the field until they fill it with a number before they
can move on. Thank you for your help!
Private Sub New_Orders_LostFocus()
If IsNull(New_Orders) Then
Dim iAns As Integer
iAns = MsgBox("Please Enter a Value", vbRetryCancel, "REQUIRED")
If iAns = vbCancel Then
Form_LCF![New Orders].SetFocus
Else
Form_LCF![New Orders].SetFocus
End If
End If
End Sub
following code and, if you can, tell me why I can't get the focus to stay on
the field 'New Orders'. It just goes to the next field.
What I need to do is if the salesperson leaves a field blank the msgbox will
pop up telling them to enter a value. After hitting retry or cancel the
cursor will stay on the field until they fill it with a number before they
can move on. Thank you for your help!
Private Sub New_Orders_LostFocus()
If IsNull(New_Orders) Then
Dim iAns As Integer
iAns = MsgBox("Please Enter a Value", vbRetryCancel, "REQUIRED")
If iAns = vbCancel Then
Form_LCF![New Orders].SetFocus
Else
Form_LCF![New Orders].SetFocus
End If
End If
End Sub