Others

Set Focus Between Microsoft Access Forms and Subform Controls

Algirdas JasaitisAlgirdas Jasaitis Nov 22, 2026 868 views

Question details

Move keyboard focus from a main form or another subform to a specific control inside an Access subform.

Set Focus Between Microsoft Access Forms and Subform Controls
Product
Microsoft Access
Device & OS
not provided
Scenario
A form contains one or more subforms, and the user wants predictable keyboard navigation between their controls.
Observed behavior
Focus needs to move to the destination subform control before it can move to the target control inside the subform.
Before you start

Open the main form in Design View and check the Name property of each subform control and target control in the Property Sheet. The subform control name may differ from the name of the form it displays.

Solution 1Recommended

Use VBA to focus a control in a subform

Use this approach when a button or form event should move focus to a specific control in a subform.

Call SetFocus on the subform control first, then call it on the target control inside its Form object. The destination control must be visible and enabled.

When navigating between sibling subforms, use the Parent property to reference the main form and its destination subform control.

1
Open the event procedure

Open the form in Design View, select the button or control that should trigger navigation, and use the Property Sheet's Event tab to create an appropriate event procedure, such as On Click.

2
Navigate from the main form

In the main form's event procedure, replace MySub and txtGoHere with your control names and add: Me!MySub.SetFocus Me!MySub.Form!txtGoHere.SetFocus

3
Navigate between subforms

In an event procedure on the source subform, replace OtherSub and txtGoHere with the destination control names and add: Me.Parent!OtherSub.SetFocus Me.Parent!OtherSub.Form!txtGoHere.SetFocus

4
Test navigation

Open the main form in Form View and trigger the event. Confirm that the destination subform is loaded and that focus lands on the intended control.

Use VBA to focus a control in a subform
Use control names: MySub and OtherSub refer to subform controls on the main form, not necessarily the names of their source form objects.
Free Microsoft Office alternative

Work with Office documents in WPS Office

WPS Office is a free, lightweight alternative for documents, spreadsheets, and presentations, with a familiar interface and Microsoft Office format compatibility that supports an easy transition. It does not run Microsoft Access forms or VBA and cannot fix Access subform focus.

Create and edit documents, spreadsheets, and presentations in a familiar interfaceOpen and save common Microsoft Office formats, including DOCX, XLSX, and PPTXUse WPS Spreadsheets to work with tabular data outside an Access formGet started with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why do I need to focus the subform control first?

The target control is inside the subform. From the main form, call SetFocus on the subform control first, then call SetFocus on the target through the subform control's Form property.

How do I move focus from one subform to another?

From the source subform's event procedure, use Me.Parent to reach the main form. Focus the destination subform control, then focus its target control, for example: Me.Parent!OtherSub.SetFocus followed by Me.Parent!OtherSub.Form!txtGoHere.SetFocus.

Why does SetFocus fail on my target control?

Check that the destination subform is loaded and that the target control is visible and enabled. In Design View, use the Property Sheet to verify the control names, especially the subform control's Name.

Can I control the Tab key order without VBA?

Yes. In Design View, use Tab Order on the main form and each subform to arrange their controls. Check the Tab Stop and Cycle properties, then test the sequence in Form View.