Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Directory > Access > Tab to Form Footer < ANSI 89 v 92 | Unsplit a Database >
Back to Tab to Form Footer    Comments List
Pinned    Upload Images   Link   Email  
Transcript
Richard Rost 
          
5 months ago
Welcome to another TechHelp video brought to you by AccessLearningZone.com. I'm your instructor Richard Rost. Today we're gonna learn how to tab between the different sections of a form with just a keyboard. Right, you got a single form here. You got some fields up top. You go tap tap tap tap tap tap. You got stuff down here in the form footer or maybe in the form header up top, right? You come down here, you hit tab. What does it do? It jumps you to the top of the next record. No, I want to be able to go down to the form footer or maybe back up. That's what we're gonna talk about in today's video. This is going to be both a beginner and a developer video because there's a way to do it with just a keyboard, which I'm gonna show you for the beginners. And then if you're a little more advanced with your developers, you don't have to remember any special keystrokes. I'll teach you how to just jump right from this one down to here with a little tiny bit of code - one line of code folks, just one line.

Today's question comes from Ryan in Columbia, Maryland one of my silver members. Ryan says, "I've got several fields in my form footer that I want to navigate to using the tab key without needing to use the mouse. I'm the same way. I hate when I'm doing data entry and having to stop and grab the mouse. Is there a way to jump from the last field in the detail section directly to the first field in the form footer?" Yes, let me show you the beginner way first where you can just hit a particular key. It's not the tab key unfortunately, but it'll do what you need to do without any programming.

Before we get started, if you are a beginner and you're not familiar with the tab order, tab stops, and tab cycle, go watch this video course. Watch my Access Beginner 1 class first. I do talk about tab order in that, but this covers a few other things you might find of interest. Here it is on my website and on my YouTube channel. Go watch this and come on back.

Okay, here I am in my TechHelp free template. This is a free database you can download on my website if you want to. In here I got a form, customer form, and let's say I got some stuff down in the form footer. Now it could be just other fields, could be random stuff down here. So let's turn the form footer on: right click and then form header/footer. We don't use the page header/footer - the page header/footer is for printing forms and we don't print forms, we print reports, so we will never use the page header, all right? Form header/footer.

Now you can use the form header if you want to put stuff over here in the form header too. That's fine. I sometimes put the ID up there because I don't want the user to have access to it anyways because they can't change it. Right, so let's say we're gonna put the notes down here. That's fine and maybe these three fields, all right? It's really stylistically up to you if you want to have stuff in the form footer. Usually I use a form footer a lot for calculations, but you could have fields like a notes field down here. In continuous forms, which we'll talk about in a minute, you can put your notes field down here and it'll be bound to whatever field you happen to be on, okay? I'm just gonna get rid of these buttons for the sake of argument here. Let's go to this, it's active, and okay. So we got our fields in here, save it, close it. If I open it back up again, I start there in first name and I hit tab tab tab tab tab tab tab tab. All right, and it jumps to the first field in the next record. I went to record two.

All right, first thing I want to do though is if you're gonna do this, if you like jumping between the sections, I like having it so it just cycles on the current record. That's my preference. That's what I like to do. So I'm gonna go up here to the form properties, so the square right there, go to other, and I like to change the cycle to the current record only. That's just something I like to do. This way, no matter how many times you tab, it just stays on the same record. If you want to go to a different record, you can just come down here and hit the next record button like that.

Now if you are a keyboard warrior and you want to move between the records, Control+Page Up and Page Down. So Control+Page Down will move you through the records that way or Page Up. Okay, if this is the stuff you do every day, you just, you just remember it, right? Control+Page Up, Page Down. Okay, now I said there's a keyboard shortcut to move between the different sections. Yes, it's the F6 key. Again, you just got to remember it. Write it down, put it on a sticky note, and eventually it'll stick. If you hit F6, it'll jump you down to the next section. Now here's the problem: hit F6 again and it jumps you over the navigation pane. Now you're over here, right? Hit F6 again, and now you're down here. So F6 is a bit of a pain. Now it's up on the ribbon, now it's back in here, now it's there, right? Shift+F6 will go backwards. So if you want to take the time to remember that, maybe even put it on a label right here, right? F6 to go to the form footer, that's up to you. Okay, so that's the non-programming keyboard method: F6, Shift+F6, and of course Control+Page Up/Page Down if you want to move through the records.

All right, what about the way to make it easy? So when you're up here, and you hit tab, tab, tab, tab, tab, now, I want to go tab down into the notes section. Right, how do we do that? Well, we need one line of code, one line of VBA code. Well, we got it, and it's just where to put it, right? Now first, if you've never done any VBA programming before, don't panic. It's not hard. Just go watch this video first. It's about 20 minutes long. It'll teach you everything you need to know to get started. So go watch this.

All right, so what we're gonna do is we're gonna go into Design View. We're gonna find the field that we want to be on. So when the user hits tab, we're gonna grab that tab key, right, the key press on the keyboard, and we're gonna say okay, if I see a tab key while you're sitting here, I want you to jump there. Okay, so open up the properties for country or whatever the last field is in your detail section. Pop over to events, and you want to find key down. Now there's key press and there's key down. For this, we're gonna use key down. They're slightly different in the way that they work. There's key down, key up, and key press. I actually have another video coming out soon on the differences between the three of those, but for now, let's just focus on key down. Hit the dot dot dot button, that'll open up your VBA code editor.

So we're gonna resize it. Yeah, there we go. We don't need the Project Explorer, so I'm gonna close that. All right, nice and simple. I'm in country key down. Now the key down event gets two things: the key code, which is what key was pressed, and then the shift key, which indicates whether the Control, Shift, or Alt keys were pressed. We don't need that for this example right now. Okay, so what I'm gonna say in here is if the key code equals, it's a special key, called vbKeyTab. That's a special constant, right? Then, so in other words, if I see the tab key come in while I'm on the country field, where do I want to go? I'm gonna go out to the notes field. So I'm gonna say notes.setfocus. That says move over to the notes field. That's it. That's all you need. That's one line of code. Right? Key code equals vbKeyTab, and notice how that camel case, right? It capitalized those because Access recognizes that as a constant. Then notes.setfocus. All right, debug, compile once in a while, save it, close it, close it, open it, and here we go.

Tab, tab, tab, tab, tab, tab, tab, and I'm right down there. See that? Pretty cool, pretty cool. Now let's keep going. Tab, tab, tab, tab, tab, tab, tab, tab. Now it's just cycling in the footer. Okay, so we can do the same thing with the credit limit field. When it hits credit limit, if I hit tab here, jump back up here to first name. We're never going up to the customer ID because it's just, you can't change it anyways. It's just for, it's just to sit there and look pretty, right? So right now, come in here. I'm going to, I want you to pause the video right now, and I want you to do it on your own, right? Credit limit, and then what do we do from here? Did you get it? Did you get it to work? All right. Go to events, key down, dot dot dot. Same thing: if key code equals vbKeyTab then first name.setfocus. Save it. I like throwing a debug, compile once in a while, close it, close it, open it. Tab, tab, tab, tab, tab, tab, tab, tab, and I'm back up. That's it. See? One line of code. A lot of stuff in Access really is just one line of code will do what you need to do. Really super cool. You just got to know where to put that line of code.

All right, so what if you want to go backwards? What if you go tab, tab, tab, tab, tab, you're down here, you want to go back up the country with a little shift tab. Oh, that doesn't quite work, does it? Well, let's see. Tab, tab, tab, tab, shift tab now, now it went back to the one before that in the tab order, which was over here. So that's gonna need some additional coding. Also, what about continuous forms? All right, in here, you want to go tab, tab, tab, tab, tab, tab, tab, tab, tab, tab, and have it come down here in the footer if you have a blank record, right? Well, how do you do both of those things? We'll talk about that in the extended cut for the members. I'll show you how to use shift tab to go back up to here, and we'll talk about doing it in a continuous form.

Silver members and up get access to all of my extended cut videos, all of them. There's like hundreds of them now, and gold members can download these databases, and everybody gets free classes, and becoming a member is just, it's what the cool kids are doing, so slap that join button, and if you have any questions, let me know. But that is gonna be your TechHelp video for today. Hope you learned something. Live long and prosper, my friends. See you next time!

TOPICS:
Tabbing between form sections using keyboard  
Basic method to move between form sections  
Using F6 and Shift+F6 for navigation  
Setting form properties for tab cycling  
Control+Page Up/Down for record navigation  
Implementing a keyboard shortcut with code  
Using VBA to jump to a form footer  
VBA KeyDown event and key code handling  
Using vbKeyTab to identify the Tab key  
Setting focus on specific form fields with VBA  
Handling the tab order in continuous forms  
Using VBA to jump back to the detail section

COMMERCIAL:
In today's video, we are going to learn how to efficiently navigate between different sections of a form in Microsoft Access using just the keyboard. First, we'll cover the basic, mouse-free method for beginners. You'll learn how to use key shortcuts, like F6, to move between form sections without programming. Then, for those of you looking for a more advanced solution, we'll explore an easy way to automate this with a single line of VBA code, making data entry faster and more efficient. Plus, we'll discuss setting form properties to cycle through the current record and keyboard shortcuts for navigating multiple records. So whether you're an Access newbie or a seasoned pro, there's something here for everyone. You'll find the complete video on my YouTube channel and on my website at the link shown. Live long and prosper my friends.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Tab to Form Footer.
 

 
 
 

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 2025 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 4/23/2025 11:54:26 PM. PLT: 2s