Continuous subforms, combo boxes, and making them dependent

D

David Walker

I'll try to explain my problem with a simplified example.
Imagine I have the following fields (see below). I have these in a subform
(they are linked to a main form through UID), and I have a combo box which
allows me to choose a 'category' (ie fruit or drink). When i change this
value, I want a second combo box to give me the choices for items within
that category - ie if I chose fruit, the second box would give me the choice
of apple or banana.

UID CATEGORY ITEM
abcde fruit apple
abfed fruit banana
abdef drink water
acfea drink coffee

This should be really simple i'm sure, but I just can't make it work. I've
tried simple queries for the combo boxes, i know about requery and stuff,
have even tried looping through each record in the subform in turn to
refresh its combo box values individually. Any of the methods i've tried
might have been a little bit wrong, I haven't got much experience with
Access specifically, but the main thing that went wrong was to do with how
the second box updated. Basically I can make it update no problem, but I
can't get the combo box for each record to update independently. ie if the
first record is set as fruit, and the second as drink, both combo boxes will
either display apple and banana, or both will display water and coffee - I
can't get them to update relative to their own category settings.

Any help greatly appreciated!

David
 
S

Sandra Daigle

Hi David,

Please see my reply in microsoft.public.access

Rather than posting the same message to more than one group (multiposting)
please cross-post (send the one message to all groups at once). To
Crosspost, put all of the newsgroups into the Newsgroups field in the
message header. In this way, all responses to your post will be available
together, regardless of what group the responder was in, and the rest of us
won't have to read your post multiple times.

See http://www.mvps.org/access/netiquette.htm for more information.
 
S

Sandra Daigle

No problem . . . it never hurts to have an occasional netiquette reminder
anyway since there are always so many people wandering into the groups for
the first time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top