vb 6 Input Textbox Validation using Tab Key and KeepFocus, Example Code needed.

Question by leo1937ca Reward: 25 Pond Points + 10 Knowledge Tokens Status: Pending a resolution
My vb 6 program uses (6) TextBoxes for user input, each TextBox must contain a (2) digit number entered by the user. All (1) digit numbers must be preeced by a "0". These numbers are TEXT numbers not NUMERICAL numbers. If the user enters a (1) digit number that is not preeceded by a "0" then I would like to use the Tab Key and KeepFocus parm on that Textbox to send the User a MsgBox message to insert a "0" in the first possition of the (1) digit number. The KeepFocus parm should be activated to prevent the User from advancing to the next TextBox until the current TextBox entry has been corrected. Does anyone have a mod that does or can someone code this for me.


Click here to begin asking FREE questions

Comment from Srinivasa User Rating:  0 Knowledge Tokens
This is very useful

Comment from Dave User Rating:  84 Knowledge Tokens
You can do a few things. First, if the current text box loses focus with only one digit, then bring the focus back to that text box. (And alert the user with a message box.)

You can also make the program more user friendly by preceding the single digit with a zero automatically.


Although this question is closed, you can still post comments for others to read.



Some other Computers questions you may be interested in: Your Reward:
email address 100 Points
Advantage and Disadvantage of using c... 100 Points
VB code to allow end user to select p... 100 Points
URL link 25 Points
vb 6 Input Textbox Validation using T... 25 Points


Information provided on AnswerPond.com is not intended to substitute for informed expert medical, psychiatric, psychological, tax, legal, computer, investment, accounting, or other professional advice. For questions that require professional advice, please consult a qualified provider who is licensed in your state or country.