Pookiemeister
Well-known Member
- Joined
- Jan 6, 2012
- Messages
- 626
- Office Version
- 365
- 2010
- Platform
- Windows
USERFORM TEXTBOXES
EmpBadgeID
(Tab Index=0)
(Auto Tab = Yes)
(Enabled = Yes)
(Locked = No)
EmpFulName
(Tab Index=1)
(Auto Tab = Yes)
(Enabled = No)
(Locked = Yes)
Item
(Tab Index=2)
(Auto Tab = Yes)
(Enabled = Yes)
(Locked = No)
On my userform, I have three textboxes, how would I auto tab from EmpBadgeID to Item. Basically skip over EmpFullName. The problem that arises is when a badgeID is scanned instead of manually entered. When manually entered, what I am wanting to do, works but not when they scan they their badge ID. The total number of digits entered has to be eight. No more, no less. So I need to look at EmpBadgeID length and if it equals eight then tab to Item? Is this possible? I had even changed the Tab Index so that Item is set to 1 and EmpFullName is set to 2. Here is what I have so far and it does not work. Thank you.
EmpBadgeID
(Tab Index=0)
(Auto Tab = Yes)
(Enabled = Yes)
(Locked = No)
EmpFulName
(Tab Index=1)
(Auto Tab = Yes)
(Enabled = No)
(Locked = Yes)
Item
(Tab Index=2)
(Auto Tab = Yes)
(Enabled = Yes)
(Locked = No)
On my userform, I have three textboxes, how would I auto tab from EmpBadgeID to Item. Basically skip over EmpFullName. The problem that arises is when a badgeID is scanned instead of manually entered. When manually entered, what I am wanting to do, works but not when they scan they their badge ID. The total number of digits entered has to be eight. No more, no less. So I need to look at EmpBadgeID length and if it equals eight then tab to Item? Is this possible? I had even changed the Tab Index so that Item is set to 1 and EmpFullName is set to 2. Here is what I have so far and it does not work. Thank you.
VBA Code:
Private Sub EmpBadgeID_AfterUpdate()
If Len(Me.EmpBadgeID.Value) = 8 Then Me.Item.SetFocus
End Sub