A
AlCamp
I have a function that is used by several fields. It works just fine except
that I need the cursor to remain in the field that called the function, so
that the user can reenter a corrected value.
In the AfterUpdate of [SpoolQty] I have...
=CheckNetWeight([SpoolQty])
The Function is as follows...
Public Function CheckNetWeight(CallingCtl As Control)
If NetWeight < 0 Then
' I have a MsgBox here to explain the problem to the user
CallingCtl = 0
'**** need to put code here to keep cursor from advancing to next
field
End If
End Function
I tried Cancel, CancelEvent, Undo, and GoToControl, in various ways, but the
"tab" always executes "after" this function runs.
I think it must have something to do with Cancel, but I can't get the
syntax.
Thanks for any help in advance...
Al Camp
that I need the cursor to remain in the field that called the function, so
that the user can reenter a corrected value.
In the AfterUpdate of [SpoolQty] I have...
=CheckNetWeight([SpoolQty])
The Function is as follows...
Public Function CheckNetWeight(CallingCtl As Control)
If NetWeight < 0 Then
' I have a MsgBox here to explain the problem to the user
CallingCtl = 0
'**** need to put code here to keep cursor from advancing to next
field
End If
End Function
I tried Cancel, CancelEvent, Undo, and GoToControl, in various ways, but the
"tab" always executes "after" this function runs.
I think it must have something to do with Cancel, but I can't get the
syntax.
Thanks for any help in advance...
Al Camp