Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Developer Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Tabbing into Form Section
Gregory Clancey 
    
3 years ago
When the first field to receive focus on a Form when opened is in the Header Section the cursor doesn't seem to get there unless I include a .SetFocus within the OnLoad code or click the mouse there. Of course, the field is available and listed in the Tab Order system. Also, after inputting a value (or tabbing or <ENTER>) how can I jump into the first TextBox control of the Detail Section without explicitly encoding this?
I might as well face this after years of just using the mouse and ignoring the roadblock.
Kevin Robertson  @Reply  
          
3 years ago
A form always loads with the focus in the Detail section unless you explicitly tell it to set the focus to a control in the Header section.

For the focus to move to a control in the Detail section when pressing Tab or Enter use the KeyDown event of the control.

Example:
If KeyCode = vbKeyTab Or KeyCode = vbKeyReturn Then
     YourFieldName.SetFocus
End If
Gregory Clancey OP  @Reply  
    
3 years ago
Thanks, Kevin. You've cleared this up for me; and I assume the same trick works for moving out of DETAIL into FOOTER. I have an instance that I shall try right now. Thanks again.
Gregory Clancey OP  @Reply  
    
3 years ago
Great! I wish my car was that easy to fix!
Kevin Robertson  @Reply  
          
3 years ago
Glad to help.
If you are interested here is a list of the KeyCode Constants from Microsoft.
Gregory Clancey OP  @Reply  
    
3 years ago
I also notice that, since the Footer control to which I need the focus on moving out of DETAIL is a Command Button to close the Form, I can give it the label "&CLOSE" to make it available with the keyboard alt shortcut.
Richard Rost  @Reply  
          
3 years ago
That's what I do... the & shortcut trick for buttons or labels.
Gregory Clancey OP  @Reply  
    
3 years ago
Thanks. I'm like a sailor long marooned on some secluded island when the rescue ship arrives at last.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/9/2026 9:12:23 AM. PLT: 0s