combo box problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following two tables

Category (not normalized):
ID Category SubCategor
1 A Compac
2 A Full Siz
3 B Sid
4 B Cente

Products
ID CatI
100
200
300

On my Product form (continues form), I have Cat as a combo box and subCat as a combo box too. I like to have A and B as choices in the dropdown of cboCat and, Compact or Full Size as choices in the cboSubCat when A is selected..

1. What do i put as the control source for cboCat
2. what do I use as the row source for cboSubcat? I am having problems when I tried to switch category from the cboCat dropdown
 
Hi:

For cboCat

Select Distinct [Category] from [Category]

For cboSubCat

Select Distinct [SubCategory] from [Category] Where [Category] = '" &
cboCat.Text & "'"


Regards,

Naresh Nichani
Microsoft Access MVP

christy said:
I have the following two tables:

Category (not normalized):
ID Category SubCategory
1 A Compact
2 A Full Size
3 B Side
4 B Center

Products:
ID CatID
100 1
200 3
300 1

On my Product form (continues form), I have Cat as a combo box and subCat
as a combo box too. I like to have A and B as choices in the dropdown of
cboCat and, Compact or Full Size as choices in the cboSubCat when A is
selected...
1. What do i put as the control source for cboCat?
2. what do I use as the row source for cboSubcat? I am having problems
when I tried to switch category from the cboCat dropdown.
 
Back
Top