georgesOne
Technical User
Hi,
I have a form with a few textboxes having events as shown below.
Private Sub tbxUserCell_Change()
If tbxUserCell.text Like "###-###-####" Then
bFree = True
cboDepartment.SetFocus
End If
End Sub
For unknown reasons, it takes a few seconds until cboDepartment gets the focus and lets me edit this field. I can not detect any loops or call repeats in the code. Form and controls are unbound.
I understand there is a conflict between the Change event of this control and the SetFocus command. But I don't know how else I can achieve that after a certain formatted entry the next control receives focus.
Any comment?
Thanks, Georges
I have a form with a few textboxes having events as shown below.
Private Sub tbxUserCell_Change()
If tbxUserCell.text Like "###-###-####" Then
bFree = True
cboDepartment.SetFocus
End If
End Sub
For unknown reasons, it takes a few seconds until cboDepartment gets the focus and lets me edit this field. I can not detect any loops or call repeats in the code. Form and controls are unbound.
I understand there is a conflict between the Change event of this control and the SetFocus command. But I don't know how else I can achieve that after a certain formatted entry the next control receives focus.
Any comment?
Thanks, Georges