Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Tab? 1

Status
Not open for further replies.

l3reacher

Technical User
Jun 28, 2003
83
US
Hi, I like to know how to Auto tab a txtbox on a form, meaning when a txtbox reaches to the maximum characters in that txtbox, it automatically go to the next txtbox w/o pressing tab or clicking with a mouse. Plz Help, Thanks!
 
This should do it:

Private Sub txtTextbox_Change ()

If Len (Me!txtTextbox & "") = 50 Then
' or whatever your length is
txtTextbox2.SetFocus ' move to the next one...
End If

End Sub


 
Hi, I added those codes, changed my textbox names, lenght, but it still wouldn't auto tab. Any other ideas?? Thanks!

Whatever you do, be nice to to people who helps you or try their best to make things better for you.
 
Hi,

If you set the Auto Tab properties in your Text Boxes to Yes. Then use an Input Mask (See Help for options) say if your Text Box was 5 characters and you want the user to type in 5 letters the input mask would be LLLLL. Once the 5 letters have been typed in the next control will automatically get the Focus.

Bill
 
I'm sorry but it is still now working. I did exactly what you told me, and it still doesn't work.

I Hate Spammers and Flammers!!!
 
Hi l3reacher,

I've put an example called AutoTab.zip at
If that works for you then at least you will know that there is nothing wrong with your Access installation. Just look closely at these Text Box properties:

Auto Tab
Index
Input Mask

Bill
 
billpower: FYI; You left out the LHS quotes in
If Len (Me!txtTextbox & "") = 50 Then

Maybe jrbarnett is also doing so!!
John
 
Hi Poteen,

Thanks for your input, but the whole point of Auto Tab is that it is Auto.

Basically after the Auto Tabbed Text Box has been filled, without code or without the need for the user to press the Tab or Enter keys, the next Text Box or Control with the next highest Index No. (as long as it's Tab Stop Property is set to Yes) should get the Focus.

In case you missed my last post.

"I've put an example called AutoTab.zip at "

Bill
 
Thanks guys!!

I Hate Spammers and Flammers!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top