Sample data · this browser only

Synchronized combo boxes

Microsoft Access how-to: pick a category, then the product combo lists only that category. The second combo stores ProductID and shows the name.

Canonical frmSyncCombo · What this demo shows · Lookup system · Demos

frmSyncCombo (unbound)

AfterUpdate on Category rebuilds the Product RowSource. Inactive products stay out of the drop-down.

No product selected.

Products (Split · datasheet)

Click a row to load the selected product. These rows feed the combo above.

ID ProductName Category ListPrice

Product

Category combo stores the ID. Inactive rows drop out of the synced product list.

What this demo shows

Microsoft’s synchronized combo how-to, with the Nifty Access combo contract: store the ID, show the name.

  • Category then product — AfterUpdate on the first combo rebuilds the second RowSource.
  • Combo stores the ID — Microsoft’s sample selected ProductName only. This one keeps ProductID.
  • Hide, not delete — inactive products stay in the table and leave the drop-down.
  • Unsaved changes — leave a dirty product and you get Yes / No / Cancel (Access Me.Dirty).

Will this work when the data is in a database?

Yes. These are sample rows in this browser. The same CategoryID / ProductID shape is what we would save in a company database. Nested lists in the lookup system use the same idea: the second list is WHERE parent = the ID you just picked.

Sample data only. Source: Microsoft Access How to Synchronize Combo Boxes sample.