Others

Load an Access Subform Based on a Combo Box Selection

Adam DavisAdam Davis Nov 14, 2026 868 views

Question details

Display a different subform on a Microsoft Access form based on a combo box selection.

Product
Microsoft Access
Device & OS
not provided
Scenario
A parent form has a combo box with choices such as A, B, and C, each associated with a different subform.
Observed behavior
The desired subform appears in the parent form when the user selects the corresponding combo box value.
Before you start

Create the forms you want to display and add a combo box and a subform control to the parent form. In Design View, check the controls' Name properties and confirm that the combo box's bound values match the values used in your code.

Solution 1Recommended

Change the subform control's SourceObject in the After Update event

Use one subform control and select its source form according to the combo box value.

1
Find the control names

Open the parent form in Design View. Select the combo box, open the Property Sheet, and check its Name property. Then select the subform control and check its Name property; this can differ from the embedded form's name.

2
Open the event procedure

Select the combo box and, on the Property Sheet's Event tab, choose After Update. Select [Event Procedure], then click the ellipsis button to open the VBA editor.

3
Add the selection code

In the generated AfterUpdate procedure, add the following code. Replace cboChoice and subformControl with your control names, and replace the form names with yours: Select Case Me.cboChoice.Value Case "A" Me.subformControl.SourceObject = "Form.frmSubA" Case "B" Me.subformControl.SourceObject = "Form.frmSubB" Case "C" Me.subformControl.SourceObject = "Form.frmSubC" End Select

4
Test the selection

Save the form, open it in Form View, and choose A, B, and C from the combo box. Confirm that the corresponding form appears in the subform control.

Check linked fields: If the subform must show records related to the parent, check the subform control's Link Master Fields and Link Child Fields properties. The linked fields must be suitable for each form you load.
Free Microsoft Office alternative

Use WPS Office for documents, spreadsheets, and presentations

WPS Office is a free, lightweight alternative with a familiar interface and compatibility with common Microsoft Office formats for an easier move between office suites. It does not replace Microsoft Access or run Access form and VBA solutions.

Open and edit common Microsoft Word, Excel, and PowerPoint formats, including DOCX, XLSX, and PPTXWork in a familiar interface for documents, spreadsheets, and presentationsUse a lightweight office suite for everyday productivityKeep Microsoft Access for database forms and combo box subform logic
microsoft office alternative - wps office

Frequently Asked Questions

Where do I find the subform control's name?

Open the parent form in Design View, select the subform control, and check its Name property in the Property Sheet. Use that control name in the SourceObject assignment, not necessarily the embedded form's name.

Why doesn't the subform change when I select a value?

Check that the combo box's After Update property is set to [Event Procedure], that the code uses the correct control names, and that each Case matches the combo box's bound value. Also confirm that each form named in SourceObject exists.

Can I put the subforms on separate tabs instead?

Yes. In Design View, add a tab control to the parent form and place a separate subform control on each tab page. Users can then choose the tab for the form they want to see.

Will After Update load a subform when the parent form first opens?

Not by itself. After Update runs when the user changes the combo box value. If an initial subform is needed, set the subform control's SourceObject in Design View or add appropriate initialization code to the parent form's Load event.