Dual Combo boxes grouping depending on selection

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

Guest

I have a situation, where I have a cbo 'B', "Category" filtering from cbo 'A' "Supplier"
Now, what I'm trying to acheive is when I select a supplier cbo 'B' gives me only the catergories carried by cbo "A", this is easily acheived BUT I also want to display all cbo"b" when "A" is Null, This is where the problem kicks in. Because cbo "A" has a one to many relationship with cbo "B" It displays multiple lines of the same Catergory!

When the result I'm trying to acheive is when cbo "A" is null then give me individaul groupings for all of cbo "B"

ie
Canned Food
White Wine
Red Wine

Not

Canned Food
Canned Food
White Wine
White Wine
White Wine
Red Wine
Red Wine
Red Wine

I hope I have explained this in a comprehensive manner, any help would be appreciated, or if further explanation is required just toot!

Thanks heaps
Daniel
 
See:
Limit content of combo/list boxes
at:
http://www.mvps.org/access/forms/frm0028.htm

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Daniel said:
I have a situation, where I have a cbo 'B', "Category" filtering from cbo 'A' "Supplier"
Now, what I'm trying to acheive is when I select a supplier cbo 'B' gives
me only the catergories carried by cbo "A", this is easily acheived BUT I
also want to display all cbo"b" when "A" is Null, This is where the problem
kicks in. Because cbo "A" has a one to many relationship with cbo "B" It
displays multiple lines of the same Catergory!
When the result I'm trying to acheive is when cbo "A" is null then give me
individaul groupings for all of cbo "B"
ie
Canned Food
White Wine
Red Wine

Not

Canned Food
Canned Food
White Wine
White Wine
White Wine
Red Wine
Red Wine
Red Wine

I hope I have explained this in a comprehensive manner, any help would be
appreciated, or if further explanation is required just toot!
 
I have a situation, where I have a cbo 'B', "Category" filtering from cbo 'A'
"Supplier"
Now, what I'm trying to acheive is when I select a supplier cbo 'B' gives me
only the catergories carried by cbo "A", this is easily acheived BUT I also
want to display all cbo"b" when "A" is Null, This is where the problem kicks
in. Because cbo "A" has a one to many relationship with cbo "B" It displays
multiple lines of the same Catergory!

When the result I'm trying to acheive is when cbo "A" is null then give me
individaul groupings for all of cbo "B"

ie
Canned Food
White Wine
Red Wine

Not

Canned Food
Canned Food
White Wine
White Wine
White Wine
Red Wine
Red Wine
Red Wine

I hope I have explained this in a comprehensive manner, any help would be
appreciated, or if further explanation is required just toot!

Thanks heaps
Daniel

The way I like to get around that is to have the default value for the search
fields be * and not even allow the fields to be blank.

And of course any criteria would use Like...


Best regards,
J. Paul Schmidt, Freelance Access and ASP Developer
www.Bullschmidt.com/Access - Sample Access Database
www.Bullschmidt.com/login.asp - Web Database Demo
 
Back
Top