Populating a second combo box depending on criteria by the first combo box

K

King Kaos

Can someone help me, I've looked at several samples of this type cbo on a
form but I can not get this to work. I have a table called Type - which has
the fields of TypeGen and TypeSpe (these stand for Type-general and
Type-Specific). In this table I have several books names and books type
(for example I have TypeGen "Sci-Fi" and TypeSpe "2001 a space odyssey"). I
want to set up my form so when I select Sci-Fi from TypeGen I get a list of
the Sci-Fi books in the second combo field. I created a query (QType) with
the control source related to the "TypeGen" field in my form. I then Set
TypeSpe RowSource to be related to this query. I did a requery command in
the AfterEvent on the TypeGen field. But this still doesn't work for me.
It always goes back to the first record in the table and only use the
TypeGen field from the first record. - does this make sense. Can anyone
help me with this



Thanks



Keith
 
D

Dirk Goldgar

King Kaos said:
Can someone help me, I've looked at several samples of this type cbo
on a form but I can not get this to work. I have a table called Type
- which has the fields of TypeGen and TypeSpe (these stand for
Type-general and Type-Specific). In this table I have several books
names and books type (for example I have TypeGen "Sci-Fi" and TypeSpe
"2001 a space odyssey"). I want to set up my form so when I select
Sci-Fi from TypeGen I get a list of the Sci-Fi books in the second
combo field. I created a query (QType) with the control source
related to the "TypeGen" field in my form. I then Set TypeSpe
RowSource to be related to this query. I did a requery command in
the AfterEvent on the TypeGen field. But this still doesn't work for
me. It always goes back to the first record in the table and only use
the TypeGen field from the first record. - does this make sense.
Can anyone help me with this

Answered in <microsoft.public.access.forms>, where you also posted this
question independently. That's called "multiposting", and it's
generally frowned on because others don't know what answers have already
been given, and so they duplicate the effort. Also it's harder for you
to keep track of the various replies, and it's harder for later readers
of the question, who may be looking for the same answer, to learn what
they need.

In most cases a single, well-chosen newsgroup will do. If your question
really is relevant to more than one newsgroup, the approved technique is
to "crosspost" it instead, by listing multiple newsgroups in the To: or
Newsgroups: line of a single message. If you do that, the message and
any replies will appear in all the listed newsgroups automatically,
which is beneficial to all concerned.
 

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