Double Tab

=TB=

Registered User.
Local time
Today, 21:21
Joined
Aug 13, 2002
Messages
68
I am using this code in the on exit of a field on my subform,

Private Sub Quantity_Exit(Cancel As Integer)

Dim intQty As Integer

intQty = Quantity

If intQty > 0 Then
Quantity = -Quantity
End If

End Sub

Works fine, however if the Qty is >0 then I have hit Tab twice to move to the next field (Once to convert the number to a Minus and Once again to tab). I think I see why this is happening, should I have an instruction in the sub to tell focus to move to the next field and if so what would that code be.

Thanks in advance.
 
Last edited:
Try me!nxtFieldName.SetFocus
 
I tried that, the next field I want it to move to is on the next record (new record), this just moves to the relative field within this record.

Thanks for the help though.
 
how about
DoCmd.GoToRecord acDataForm, , acNext
then?
 

Users who are viewing this thread

Back
Top Bottom