Arrow Key Nav
By Richard Rost
17 days ago
Use Arrow Keys to Navigate Records & Fields Like Excel
In this video, we will talk about how to use the arrow keys to navigate between records and fields in Microsoft Access, similar to how navigation works in Excel. We will discuss the challenges of handling arrow key behavior in Access forms and text boxes, address how to move up and down between records with the arrow keys except in certain fields like notes, and explain how the left and right arrow keys can move within fields while editing, or jump to the next or previous field when reaching the end or start of the text.
Paige from St. Paul, Minnesota (a Platinum Member) asks: How can I set up arrow key navigation in Microsoft Access so that up and down arrows move between records, except in certain fields like a notes box where I want to move within the text? Also, how can I get the left and right arrow keys to move within the field while editing, but jump to the next or previous field when I reach the start or end of the text?
Members
In the extended cut, we will walk through the full implementation step by step, including how to use the Tag property to control arrow key behavior, ignore Ctrl, Alt, and Shift key combinations, and focus on left and right arrow key navigation so that movement feels natural. I will show you how to program the VBA to handle these cases, explain the file structure, and provide the complete code walk-through for setting this up in your Access projects.
Silver Members and up get access to view Extended Cut videos, when available. Gold Members can download the files from class plus get access to the Code Vault. If you're not a member, Join Today!
Prerequisites
Links
Recommended Courses
Keywords
TechHelp Access, arrow key navigation, up down arrows move records, intercept arrow keys, navigate fields with arrow keys, notes field arrow key behavior, Screen.ActiveControl, SelStart property, tab order programmatically, SendKeys, Tag property, ignore Ctrl Alt Shift arrow keys, VBA implementation
Subscribe to Arrow Key Nav
Get notifications when this page is updated
Intro
In this video, we will talk about how to use the arrow keys to navigate between records and fields in Microsoft Access, similar to how navigation works in Excel. We will discuss the challenges of handling arrow key behavior in Access forms and text boxes, address how to move up and down between records with the arrow keys except in certain fields like notes, and explain how the left and right arrow keys can move within fields while editing, or jump to the next or previous field when reaching the end or start of the text.
Transcript
Today, we are going to talk about how to use the arrow keys to navigate records and fields in Access just like Excel or for faster data entry without having to use the mouse.
The easiest question comes in from Page in St. Paul, Minnesota, one of my Platinum members. Page says, how can I set up arrow key navigation in Microsoft Access so that the up and down arrows move between the records except in certain fields like a note box where I still want to move within the text? Also, how can I get left and right arrow keys to move within the field while editing, but still jump to the next or previous field when I reach the end or start of the text?
Let's talk about it.
Now, before we talk about solutions, it helps to understand what is actually happening behind the scenes. A lot of frustration with Access comes from expecting it to behave like Excel, and under the hood, it is doing something very different.
With Access, you have forms and text boxes that are competing for control of the keyboard. The text boxes want to control the arrow keys and treat them like editing tools, but the form wants to treat them like a navigation tool. By default, Access does not know which one you want, so the behavior feels inconsistent.
I already have a bunch of other videos that will teach you what you need to do to solve this problem. First of all, I have this one, Move Up and Down With the Keys. In this video, I teach you how to intercept the up and down arrow keys so that you can move up and down between records. Then you end up with something like this. You can go up and down. I am just hitting the up and down arrow keys.
Go watch that video for step-by-step instructions on how to do that. But then the problem happens when you have a notes field down here at the bottom. If you click in there and you want to go up to the previous row inside that notes field and you hit the up arrow key, it moves you up to the previous record because the form is intercepting that up arrow key since you told it to.
So you have to say, I want to intercept that key unless I am in the notes field. I show you how to solve that problem in this video, Arrow Keys and the Text Box. Essentially, we are going to look at the Screen.ActiveControl and say, if the user is sitting in the notes field, then ignore everything I just told you to do. This way, if you are in notes, it will still behave like it normally behaves.
Another problem you have is the left and right arrow keys. Normally, if you hit the Tab key or Shift+Tab, that will move you between records. Normally, the left and right arrow keys behave like that unless you are in the middle of a field, in which case they move left and right.
But now here comes the problem. When you get to the end of the field, I am still hitting the right arrow key. You might want it to, at that point, move to the next field over. That can be tricky. The same thing happens if you go all the way to the left; you might want it to move left over to Malcolm, but it will not. It will not leave once you are in editing mode unless you hit the Tab key, and that can again confuse your users.
To solve that problem, you could say, if I am just sitting like that, where the cursor, as you can see, is blinking right at the beginning of the field (so the cursor's SelStart property is zero), then if I hit the arrow keys, that is fine. It will behave like this. If I am in the middle of the field and hit the arrow keys, I also want it to behave like that. But if I get to the end, if the SelStart (the cursor position inside that field) is equal to the length of whatever text is in that property, then at that point I also want it to tab over to the next field.
To do that, you will need to know how to use the SelStart property, which I covered in this video. There are lots of ways you can read the tab order programmatically and move to the previous or the next one in the tab order. But the easiest way honestly is just to use SendKeys and just to send a Tab character to the next one or the previous one with Shift+Tab. SendKeys works great in this particular case.
I am not a huge SendKeys fan, but there are some instances like I say in the slide here. It is the king of the "good enough" sometimes function and works perfectly for this.
After watching this and all those related videos, you should now have a solid understanding of what is happening and what kind of a solution is needed. If you want to see me walk through the full implementation step by step, we will be doing that in the extended cut for the members.
This is going to include some extras as well. For example, we are going to use the Tag property to control the arrow key behavior - is the field that I am currently on one that I am allowed to use the arrow keys for or not? Instead of having to modify your VBA code in the future, if you decide you want to add more fields, you just add a Tag to that field.
I will show you how to ignore the Ctrl, Alt, and Shift key combinations. So if someone goes Shift+Right Arrow, for example, it will not trigger. We will focus more on that left and right arrow key navigation so it feels natural. If they are at the end of the field, it will go to the right. If they are not, it will just move within the field like we talked about.
Of course, you are going to get the complete VBA walk-through, the file code structure. Gold members, it will be in the Code Vault. I will walk you through everything in the extended cut on how to do it.
If you are mainly looking to understand why Access behaves this way and what you need to do, watch those other videos and you should be able to figure that out. If not, in the extended cut, I will walk through it step by step.
Just to let you know, moving forward into 2026, I am going to be doing more videos like this where the free video focuses on explaining what is really going on under the hood. In the extended cut, I will slow down and actually build the full production-ready solution with the full code walk-through. That is all the more reason to click that Join button today.
Do not worry, I am still going to be doing regular TechHelp videos with code in them too. I am not stopping this completely, but I am going to start doing more for the members moving forward.
But that is going to be your TechHelp video for today. I hope you learned something. Live long and prosper, my friends. I will see you next time.
Quiz
Q1. What is the default behavior of the arrow keys in Microsoft Access forms? A. They inconsistently move between fields and records or edit within fields, depending on context B. They always navigate to the next and previous records C. They are disabled by default D. They always move the cursor within a text box
Q2. Why does Access sometimes move to another record when using the up or down arrow key in a notes field? A. The notes field is too short B. The form intercepts arrow key events even within the notes field C. The text box property is misconfigured D. The Access database is corrupted
Q3. How can you prevent the form from intercepting the up or down arrow keys when you are in a specific field like a notes box? A. By disabling the arrow keys permanently B. By checking if Screen.ActiveControl is the notes field and skipping the navigation code C. By hiding the notes field when not needed D. By renaming the notes field
Q4. What property tells you the current position of the cursor within a text box? A. TabOrder B. Screen.ActiveControl C. SelStart D. KeyCode
Q5. If you want the right arrow key to move to the next field when the cursor is at the end of the current field, which property should you check? A. The Tag property B. The SelStart property compared to the text length C. The Visible property D. The Locked property
Q6. What is a straightforward way to programmatically move to the next or previous field in Access when using arrow keys? A. SendKeys to send Tab or Shift+Tab B. Use the Enter key only C. Using mouse clicks D. Set focus to the form header
Q7. Why might you use the Tag property in conjunction with your arrow key navigation code? A. To store the primary key of the record B. To control which fields respond to arrow key navigation C. To indicate which fields are required D. To display tooltips for users
Q8. What should your arrow key handling code do with combinations like Ctrl, Alt, or Shift + arrow keys? A. Always process them as normal arrow key presses B. Ignore them so only plain arrow key presses trigger navigation C. Treat them as errors and show a message D. Use them to close the form
Q9. What is the key conceptual difference between Excel and Access in terms of arrow key behavior? A. Excel allows only mouse navigation, Access does not B. Access forms and text boxes compete for keyboard control, leading to inconsistent arrow key behavior C. Access was built to emulate Excel exactly D. Excel uses ASCII codes, Access uses Unicode
Q10. What was suggested as the focus of future video tutorials for members regarding arrow key navigation? A. Only general database design concepts B. Full, production-ready solutions with detailed code walk-throughs in extended cuts C. Excel automation features only D. Web-based Access app tutorials
Answers: 1-A; 2-B; 3-B; 4-C; 5-B; 6-A; 7-B; 8-B; 9-B; 10-B
DISCLAIMER: Quiz questions are AI generated. If you find any that are wrong, don't make sense, or aren't related to the video topic at hand, then please post a comment and let me know. Thanks.
Summary
Today's video from Access Learning Zone addresses how to set up your arrow keys for smoother navigation within your Access forms, similar to how things work in Excel, and to speed up data entry without needing to use the mouse.
The question at hand is how to configure the keyboard so the up and down arrow keys take you through records, except in certain special fields like notes boxes where you still need to move inside the text itself. Another concern is ensuring that the left and right arrow keys allow you to move within the text of a current field, but when you reach either end of the field, you jump right to the previous or next field as if you were tabbing.
To understand why this is not the default behavior, it helps to look at what is happening inside Access. Access forms and text boxes often both want to control how arrow keys work. Text boxes handle them as editing controls, while forms want to use them for navigation. Because of this, you end up with sometimes inconsistent behavior depending on where your focus is.
I have a number of tutorials that show how to address these issues. In one video focused on moving up and down with the arrow keys, I explain how to intercept the up and down keys to switch between records. This gives you the familiar Excel-like feeling where you can smoothly move through your data using only the keyboard.
However, this solution creates a new issue when it comes to fields like notes or memo boxes. If you're editing a notes field and want to move up or down within that text, the up or down arrow key will by default jump you up or down to the next Access record rather than moving inside the text field. To correct for this, I walk you through how to check which control is currently active (using the Screen.ActiveControl property). When your focus is in a notes field, you can ignore the normal arrow key interception, allowing the field to behave like a regular text editor.
Another challenge comes up with the left and right arrow keys. Generally, Tab and Shift+Tab are the standard methods to move between fields in a form, while left and right arrow keys traditionally only move within the characters of a field. The desired behavior for some users is that, when the cursor hits the far left or far right of a field's text, the arrow key should then move the focus to the next or previous field automatically. By default, Access does not do this; you have to press Tab.
To get Access to behave this way, I show how to use the SelStart property of a text field, which holds the current cursor position. If SelStart is at the start or end of a field's text, you can programmatically trigger a move to the correct field. There are multiple methods to handle tab order, but the easiest way is simply to use SendKeys to simulate a Tab key press at the right moment. Although SendKeys is not always my preferred approach, for this situation it works effectively and simply.
After following these instructions and watching the related videos, you should have a good understanding of why Access responds the way it does and what steps you need to take to control keyboard navigation.
In today's Extended Cut, you can see a full step-by-step walkthrough of implementing these changes. This will include techniques like using the Tag property of controls to manage which fields should use special arrow key navigation. Rather than having to update your VBA code every time you add or remove a field, you just adjust a Tag property. I also demonstrate how to ignore combinations with Ctrl, Shift, and Alt, so holding those down with the arrow keys will not interfere. We will go into detail on left and right arrow key handling to make moving between fields feel as seamless as possible. Of course, this includes a full VBA explanation and walkthrough, and members will have access to the downloadable code in the Code Vault.
If you want to primarily understand why Access handles keyboard input this way, those other videos will be most helpful. If you want the full implementation at a detailed pace, the extended cut covers it all, step by step.
Looking ahead, my approach will be to emphasize foundational explanations in the free videos, and save the full in-depth buildout and code for the extended cuts for members.
You can find a complete video tutorial with step-by-step instructions on everything discussed here on my website at the link below. Live long and prosper, my friends.
Topic List
How Access handles arrow key navigation by default Difference between form and text box keyboard control Intercepting up and down arrow keys to navigate records Allowing arrow key navigation except in specific fields Using Screen.ActiveControl to identify the current field Ensuring normal arrow key functionality in note fields Understanding left and right arrow keys within fields Determining cursor position with the SelStart property Moving to next field when reaching end of a field with arrow keys Using SendKeys to simulate Tab and Shift+Tab navigation
Article
Navigating forms in Microsoft Access with the keyboard can be confusing, especially if you are coming from Excel where the arrow keys naturally move you around the grid. In Access, the situation is a bit more complex because text boxes and the form itself both want to take control of the arrow keys. By default, Access does not interpret the arrow keys strictly for navigation, which can frustrate users seeking quick, mouse-free data entry.
If you press the up or down arrow in most Access forms, you might expect to move between records, similar to moving between rows in Excel. Sometimes that works, but as soon as you place your cursor inside a multiline text box, like a notes field, you expect the up and down arrows to move the cursor within that field instead of jumping to another record. Access does not handle this distinction automatically, so you need to add some logic to make the arrow keys behave as you want.
To get the up and down arrow keys to move between records, you must write code to capture key presses at the form level, typically with the KeyDown or KeyUp event. When the user presses Up or Down, the code moves the focus to the previous or next record. But if the current control is a notes field where you want to allow cursor movement within the text box, your code should skip the special handling and let Access use the arrow key as usual.
You can identify when the focus is in the notes field by checking which control is currently active on the form. The VBA property Screen.ActiveControl returns the control the user is currently editing. If it matches your notes field, then ignore the arrow key and do nothing special, letting Access do its default behavior. Otherwise, for all other fields, intercept the up and down keys and move the record pointer as desired.
Left and right arrow keys present a different challenge. Normally, pressing Tab or Shift+Tab jumps between fields, but many users instinctively reach for the left and right arrow keys. By default, those arrow keys just move the cursor within the text box, and when you get to the end or beginning, they stop—you do not automatically move to the next or previous field. To make navigation smoother, you can watch for the left and right arrow keys at the text box level. If the cursor is at the very beginning or end of the text (using the SelStart property of the control, which tells you the current position of the cursor), and the user presses right or left, respectively, you use SendKeys to simulate a Tab or Shift+Tab. That way, the user can move through the form's fields with just the arrows, similar to Excel.
For example, suppose you have this code in a text box's KeyDown event:
If KeyCode = vbKeyRight And Me.SelStart = Len(Me.Text) Then SendKeys "{TAB}" KeyCode = 0 End If
If KeyCode = vbKeyLeft And Me.SelStart = 0 Then SendKeys "+{TAB}" KeyCode = 0 End If
This code watches for the right arrow when the cursor is at the end of the text, and the left arrow at the start, and then sends a keyboard Tab or Shift+Tab to move the focus. KeyCode = 0 suppresses the default left or right action, so you do not get a double movement.
For up and down arrows to move between records except for certain fields, you can use code like this in your form's KeyDown event:
If (KeyCode = vbKeyUp Or KeyCode = vbKeyDown) Then If Screen.ActiveControl.Name <> "NotesField" Then If KeyCode = vbKeyUp Then DoCmd.GoToRecord , , acPrevious Else DoCmd.GoToRecord , , acNext End If KeyCode = 0 End If End If
Replace "NotesField" with the actual name of your notes control. This code allows natural movement within the notes field, but the arrows will move records everywhere else.
If you want to make the list of ignored fields flexible, use the Tag property of your controls. Set Tag = "IgnoreArrows" on each control where you want arrow keys to have their default text movement. Then, update your code to check the Tag property instead of the control name, making your form much easier to maintain.
Finally, SendKeys can feel risky because it pushes keystrokes into Windows, and sometimes they might not land where you expect if focus changes. However, for moving between fields within a form, it is generally reliable. You can also check for modifier keys like Ctrl, Alt, and Shift during the KeyDown event using the Shift parameter, so keyboard shortcuts do not accidentally hijack your navigation logic.
By using the combination of ActiveControl, SelStart, SendKeys, and optionally the Tag property, you can give your Access forms more intuitive navigation with the arrow keys, making data entry much faster and friendlier for users expecting Excel-like behavior. Use the examples and the logic above as a foundation, and adjust as needed for your specific form layout and workflow.
|