V
Vet Tech
I'm using A2003 to create a DB to handle uniforms. Earlier my
categories table (tblCategories) had only 2 fields ie Category and
Size so it was reasonably easy to use cascading combo boxes in a form
to select a specific category/size combination and input these in to
the main table.
Now I want to create a proper relational arrangement and link the
tblCategories to the main table by adding another field to
tblCategories called CatSizeID. This would be an autonumber primary
key and so be unique for each combination of Category and Size. So far
there are about 200 unique combinations from the table which has 20
categories and 15 sizes.
On a form, I want the users to continue to use the two combo boxes to
select first category from cmbCategory and then size from cmbSize so
that the corrrect CatSizeID is selected and used later as a
reference.
My problem is how to restrict the choice visible in cmbCategory to
show just the 20 unique categories and not and not the 200 from the
lines that make up the 200 combinations. Once the size is selected
then the aim is to establish the CatSizeID forthis combination.
I'm being stymied at pesent because SELECT DISTINCT gives me all 200
lines. Maybe I'm approaching it in the wong direction? Can someone
assist please.
categories table (tblCategories) had only 2 fields ie Category and
Size so it was reasonably easy to use cascading combo boxes in a form
to select a specific category/size combination and input these in to
the main table.
Now I want to create a proper relational arrangement and link the
tblCategories to the main table by adding another field to
tblCategories called CatSizeID. This would be an autonumber primary
key and so be unique for each combination of Category and Size. So far
there are about 200 unique combinations from the table which has 20
categories and 15 sizes.
On a form, I want the users to continue to use the two combo boxes to
select first category from cmbCategory and then size from cmbSize so
that the corrrect CatSizeID is selected and used later as a
reference.
My problem is how to restrict the choice visible in cmbCategory to
show just the 20 unique categories and not and not the 200 from the
lines that make up the 200 combinations. Once the size is selected
then the aim is to establish the CatSizeID forthis combination.
I'm being stymied at pesent because SELECT DISTINCT gives me all 200
lines. Maybe I'm approaching it in the wong direction? Can someone
assist please.