Setting the tab order
Setting the tab order in our form is the last thing we need to do. The correct tab order will ensure that the focus will be on the Name textbox when the form is loaded. Furthermore, every time we press Tab, the focus will move in an orderly manner from one control to the next; from the Name box to Department, then Age, Start Date, the Save Button, and finally the Cancel button. It makes the form user friendly, in the sense that you can complete the form by pressing the Tab key, jumping from field to field, without using the mouse.
In this recipe, we will be setting the tab order.
Getting ready
Make sure that Controls.xlsm
is still open. New Record Entry Form should be visible, and both the Project window and the Properties window should be visible on the left of the VBA Editor.
How to do it…
We need to do the following:
- Select the Frame object on the form. If the UserForm is selected, we wouldn't be able to set the tab order...