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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

page control 1

Status
Not open for further replies.

rlf1957

IS-IT--Management
Mar 7, 2003
60
0
0
US
I have a 3 page form with buttons to move to the different pages. IT works great except that when tabbing thru the fields during data entry, the form scrolls up after the last field is tabbed thru.

Is there any way to prevent this scrolling when the last field on a page is reached ? I believe I have seen this discussed here but can't seem to locate it.

Thanks,
RLF1957
 
Yeah, it's been covered, but like you, I can't seem to quickly put my fingers on a good thread. Anyway, seems like you want to disable the normal behavior of the <Tab> key in the last field. To do that, you must trap the keystroke. First, set the Key Preview property of the form to "yes." Then in the KeyDown event of the last field on your form, put in code like this:
Code:
If KeyCode = vbKeyTab Then
    KeyCode = 0
End If

HTH

Ken S.
 
Thanks, Eupher .....

That did the trick perfectly.
Sorry it took so long to get back to you - this is a part time endeavor.

RLF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top