Access 2010 combobox with foreign key and relationships

MCRetro

New member
Local time
Today, 06:20
Joined
Sep 4, 2014
Messages
3
I created an Access 2010 database in Windows 7.

My form has two comboboxes. The first is for level1 choices. These link up to my tblLevel1.

My structure looks like this:
Level1ID: this is autogenerated
cat number: cat1, cat2, cat3, etc.
cat description: mailroom, reception area, etc.

The second combobox is for level2 choices. These link up to tblLevel2.

My structure for that table looks like this:
ID: autogenerated
level1ID: this is my foreign key. It matches up to the Level1ID in my tblLevel1 with a one to many relationship : cat1, cat2, etc.
description2: office materials, applications, etc.

I have the relationship working: when I select a cat1 from the level1 combobox, it automatically gives you the choices you need in the level2 comboboxes that match. I can select what I want and it gets recorded in the table connected to my form.

My column width is set so the unique ID is zero, so I do not see it on the combobox.

After I make the selection, however, the level2 combobox shows the foreign key info: cat1, cat2, etc. How can I make it show description2 from table tblLevel2? I still want it to record the ID from tblLevel2.

Please advise.
 
Can you show us the SQL Statement that is used in the Row Source property of the second combo box
 

Users who are viewing this thread

Back
Top Bottom