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!

User Wants To Stay On A Full Text Box Until They Press The Tab Key? 4

Status
Not open for further replies.

drosenkranz

Programmer
Sep 13, 2000
360
US
I have several fields that are up to 8 digits long. The maxlength on these fields have been set to 8 to make sure they don't key in additional digits by accident. I'm trying to keep the user from getting confused or having to look up at the screen when transposing these codes to the form on their screen.

As it is now, the cursor automatically jumps to the next control when the maxlength is reached in one of these text boxes. The users want to ALWAYS have to press the tab key to move to the next control. How can I make the cursor stay in a "full" text box until they press the tab key? Is there a property? Thanks.
The 2nd mouse gets the cheese.
 
drozenkranz,

Check for LASTKEY()=9 in VALID of your TEXTBOX.

Harry
 
Harry,

How can this be used to require the user to press <Tab> to leave the text box?
The 2nd mouse gets the cheese.
 
Try, in the VALID event:

IF LASTKEY() != 9
RETURN 0
ENDIF

Jim
 
See documentation for SET CONFIRM ON|OFF.


Don
dond@csrinc.com

 
drozenkranz,

Modify code submitted by JIMSTARR as follows:

IF LASTKEY()!=9
WAIT WINDOW &quot; You must use <TAB> Key to Exit this field &quot;
RETURN 0
ENDIF

Harry
 
Hi Drozenkranz,

Of the proposed solutions, DONDAS's uses the proper technique. A simple SET CONFIRM ON will force the user to TAB/ENTER/ARROW to the next control. Jon Hawkins
jonscott8@yahoo.com

The World Is Headed For Mutiny,
When All We Want Is Unity. - Creed
 
Thanks for the help. (again) :)
The 2nd mouse gets the cheese.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top