All Episodes

December 10, 2024 18 mins

Today's TechHelp tutorial from Access Learning Zone focuses on navigating forms and subforms in Microsoft Access. If you're working with forms, you may have experienced issues with tabbing through different sections such as headers and footers. The tab order might not always be intuitive, especially if a subform is involved. Our discussion today will cover how to effectively navigate these sections and how to set the focus on the first field of the first record in a subform.


This tutorial caters to both beginners and developers. I'll start by introducing some useful keyboard shortcuts for navigating forms with the keyboard alone. Additionally, I will guide you through a simple method using a few lines of code for those who prefer not to rely solely on shortcuts.


Recently, one of my gold members, Antonio from Lytle, Texas, raised an interesting question in the forums. He set up a parent form with a subform containing fields in both the header and detail sections. However, when navigating from the parent form to the subform, the tab order skipped the header and went straight to the detail section. Antonio wanted the tab order to be parent form, subform header, then subform detail.


I believe I can help, and others have already offered solutions in the forum. There are several ways to handle this, but I will show you two: a beginner-level solution using keyboard navigation and a developer-level solution using VBA code.


For beginners unfamiliar with Visual Basic or programming, understanding concepts like tab order, tab stop, and tab cycle is essential. If this is new to you, I recommend watching some of my beginner lessons to grasp these foundational ideas before proceeding.


Today, I'm using the TechHelp free template, available for download on my website. This example involves a customer form with a subform for managing orders. Typically, when tabbing through the form, the process goes straight to the subform's first field. Many people have asked about maintaining a consistent starting point in the subform, regardless of previous navigation. Some prefer the focus to return to the first field of the first record each time.


Antonio's specific issue involved a header section. By default, certain fields might be located in the footer, but I moved a notes field into the header to demonstrate how bound fields operate when switching between records.


For those preferring a keyboard-only solution that involves no programming, the F6 key can be used to navigate through different sections of a form. The F6 key toggles between the detail section and the header, although it is not an ideal solution as it can also move the focus outside of the subform.


For a more robust solution involving code, we'll make use of VBA. If you're new to VBA, don't worry. This task only requires two lines of code. The main objective is to set the focus on the first record and a specific field - in our case, the notes field - as soon as we enter the subform. To implement this, you'll add simple commands in the On Enter event of the subform control.


This approach ensures that whenever you tab into the subform from the parent form, the focus is set as desired. After adding the code, when you navigate the form, you'll notice that although it briefly appears to focus on another field, it immediately switches to the notes field of the first record.


Dealing with section navigation after the initial tab is another challenge. While you can use F6 to move through various sections, if you prefer, additional code can facilitate jumping between fields as users tab through. I'll cover this advanced topic in a future lesson.


For now, if you want to learn more about moving records using commands like GoToRecord and GoToControl or explore VBA program

Mark as Played

Advertise With Us

Popular Podcasts

NFL Daily with Gregg Rosenthal

NFL Daily with Gregg Rosenthal

Gregg Rosenthal and a rotating crew of elite NFL Media co-hosts, including Patrick Claybon, Colleen Wolfe, Steve Wyche, Nick Shook and Jourdan Rodrigue of The Athletic get you caught up daily on all the NFL news and analysis you need to be smarter and funnier than your friends.

On Purpose with Jay Shetty

On Purpose with Jay Shetty

I’m Jay Shetty host of On Purpose the worlds #1 Mental Health podcast and I’m so grateful you found us. I started this podcast 5 years ago to invite you into conversations and workshops that are designed to help make you happier, healthier and more healed. I believe that when you (yes you) feel seen, heard and understood you’re able to deal with relationship struggles, work challenges and life’s ups and downs with more ease and grace. I interview experts, celebrities, thought leaders and athletes so that we can grow our mindset, build better habits and uncover a side of them we’ve never seen before. New episodes every Monday and Friday. Your support means the world to me and I don’t take it for granted — click the follow button and leave a review to help us spread the love with On Purpose. I can’t wait for you to listen to your first or 500th episode!

Dateline NBC

Dateline NBC

Current and classic episodes, featuring compelling true-crime mysteries, powerful documentaries and in-depth investigations. Follow now to get the latest episodes of Dateline NBC completely free, or subscribe to Dateline Premium for ad-free listening and exclusive bonus content: DatelinePremium.com

Music, radio and podcasts, all free. Listen online or download the iHeart App.

Connect

© 2025 iHeartMedia, Inc.