
Fixing Wrong Combo Box Selections in Microsoft Access UNION Queries
transcript
show notes
When a Microsoft Access combo box is populated by a UNION query, it can appear to work perfectly until selecting one item suddenly displays another. The usual culprit is a duplicate numeric ID coming from different tables, such as Employee ID 15 and Customer ID 15.
This episode explains why AutoNumber values are unique only within their own tables, not across a combined query result. When a combo box binds to the shared number alone, Access cannot tell which source record was actually selected.
Learn how a simple prefixed selector value, such as E15 and C15, prevents these ID collisions without changing the underlying tables. The discussion also covers a real example involving foods and meals, plus what to consider when VBA code needs to determine which source table the selected item belongs to.