Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Form Text Box Control Navigation
Author:
PS.Ramkumar
E-mail:
Click to e-mail author
Website:
http://peeyesram.4t.com
Submitted:
6/3/2005
Version:
VB6
Compatibility:
VB6
Category:
Forms
Views:
13353
Easily navigate to next control using this code.
Declarations:
'Place all the text box and every control on ur form 'then call the module steFocusToNextControl from 'keypress event.
Code:
'key pressevent of the controls '======================= if keyascii = 13 then call setFocusToNextControl 'write the below code on ur form '========================= Private Sub SetFocusToNextControl() On Error GoTo ErrorHandler Select Case (ActiveControl.Name) Case "TxtFileId": TxtParticular.SetFocus Case "TxtParticular": TxtOldFileId.SetFocus Case "TxtOldFileId": TxtRackNo.SetFocus Case "TxtRackNo": TxtBeginDate.SetFocus Case "TxtBeginDate": TxtFileTyp.SetFocus Case "TxtFileTyp": TxtDescrib.SetFocus Case "TxtDescrib": Cmdadd.SetFocus End Select Exit Sub ErrorHandler: MsgBox "Control Not Exist" End Sub
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement