T
tkosel
I have a form with a control named "LabelQTY". The control has an
AfterUpdate Event reproduced below.
Private Sub LabelQTY_AfterUpdate()
If Me.LabelQTY < 2 Then
MsgBox "Label Quantity must be at least 2!", , "Qty must be at least
2!"
Me.LabelQTY = 2
Me.LabelQTY.SetFocus
End If
End Sub
If I enter a 1 in the field, the event fires off, but the focus still moves
to the next control on the form. There are no other events for this or any
other control. What causes this, how can I get the focus to go back to
LabelQTY to allow the user to change it to a number larger than 2 if desired?
AfterUpdate Event reproduced below.
Private Sub LabelQTY_AfterUpdate()
If Me.LabelQTY < 2 Then
MsgBox "Label Quantity must be at least 2!", , "Qty must be at least
2!"
Me.LabelQTY = 2
Me.LabelQTY.SetFocus
End If
End Sub
If I enter a 1 in the field, the event fires off, but the focus still moves
to the next control on the form. There are no other events for this or any
other control. What causes this, how can I get the focus to go back to
LabelQTY to allow the user to change it to a number larger than 2 if desired?