By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,863 Members | 838 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,863 IT Pros & Developers. It's quick & easy.

Conditional display of a Drop-Down selection in a form

P: n/a
I would like to display a drop-down list on a form conditional on the value
of another field on the same form. I am not sure if this is good form or
not. I am using Access97, but have access to 2000 also. The specific
scenario is this: I have 2 fields on a form. One is called "Manufacturer."
The other is called "ProductLine." I would like to display specific product
lines of the selected Manufacturer. Now, here's the bad news: my SQL and VB
is pretty weak. Can I do what I would like to do?

Any input would be greatly appreciated.

Thanks!

BLove
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"B Love" wrote
I would like to display a drop-down
list on a form conditional on the value
of another field on the same form. I am
not sure if this is good form or not.
It is considerate to your users (so they don't have to be confused by extra
information) and that is a good thing.
I am using Access97, but have access to 2000 also.
It'll work just fine in any version of Access.
The specific scenario is this: I have 2 fields
on a form. One is called "Manufacturer."
The other is called "ProductLine." I would
like to display specific product lines of the
selected Manufacturer. Now, here's the bad
news: my SQL and VB is pretty weak.
Can I do what I would like to do?


Along with your Access 97, there came an example database called
"Solutions.MDB". Unless you did something to prevent it, you'll find it
installed in the Samples subfolder of the Office subfolder in the folder
hierarchy where you installed Microsoft Office. As a first try, look in
"Program Files", "Microsoft Office".

Open that, look at "Working with Combo and List Boxes" and you'll see a
discussion and example of exactly what you describe. You may be able to copy
and paste, but I think you'll find it so simple that you can just create
your own.

Don't sweat the SQL... I've never used a Combo or List Box for which I could
not create the Query for its Row Source in the Query Builder -- drag and
drop. Don't sweat the VBA, because most of what you need will be to put in
the AfterUpdate event of the first Combo Box, a simple

cboProducts.Requery

Overview: You create your first Combo Box, cboManuf for selecting the
Manufacturer in the standard, usual way. Then you create another for
selecting Product, cboProduct, in the normal way, with as a criteria for the
Manufacturer ID (foreign key) in the Products table, you code =
Forms![frm<nameofyourform>]![cboManuf]. That's pretty much it.

Larry Linson
Microsoft Access MVP
Nov 12 '05 #2

P: n/a
Larry:
Thanks so much for the info! This looks like it is exactly what I am
looking for. If I weren't so tired here, I'd try it right away, but I think
I'd better start fresh on it tomorrow. I will let you know how it goes.
Again, THANKS!
~Bruce

"Larry Linson" <bo*****@localhost.not> wrote in message
news:tb*******************@nwrddc01.gnilink.net...
"B Love" wrote
> I would like to display a drop-down
> list on a form conditional on the value
> of another field on the same form. I am
> not sure if this is good form or not.
It is considerate to your users (so they don't have to be confused by

extra information) and that is a good thing.
> I am using Access97, but have access to 2000 also.
It'll work just fine in any version of Access.
> The specific scenario is this: I have 2 fields
> on a form. One is called "Manufacturer."
> The other is called "ProductLine." I would
> like to display specific product lines of the
> selected Manufacturer. Now, here's the bad
> news: my SQL and VB is pretty weak.
> Can I do what I would like to do?


Along with your Access 97, there came an example database called
"Solutions.MDB". Unless you did something to prevent it, you'll find it
installed in the Samples subfolder of the Office subfolder in the folder
hierarchy where you installed Microsoft Office. As a first try, look in
"Program Files", "Microsoft Office".

Open that, look at "Working with Combo and List Boxes" and you'll see a
discussion and example of exactly what you describe. You may be able to

copy and paste, but I think you'll find it so simple that you can just create
your own.

Don't sweat the SQL... I've never used a Combo or List Box for which I could not create the Query for its Row Source in the Query Builder -- drag and
drop. Don't sweat the VBA, because most of what you need will be to put in the AfterUpdate event of the first Combo Box, a simple

cboProducts.Requery

Overview: You create your first Combo Box, cboManuf for selecting the
Manufacturer in the standard, usual way. Then you create another for
selecting Product, cboProduct, in the normal way, with as a criteria for the Manufacturer ID (foreign key) in the Products table, you code =
Forms![frm<nameofyourform>]![cboManuf]. That's pretty much it.

Larry Linson
Microsoft Access MVP

Nov 12 '05 #3

P: n/a
Larry:

Thank you so much! This looks like exactly what I was looking for. Can you
believe I have been working with A97 ever since it came out and never knew
(or forgot) that that folder existed? I really appreciate the clear and
thorough answer you provided here. Again, THANKS! I will start fresh on
this tomorrow. ~Bruce

"Larry Linson" <bo*****@localhost.not> wrote in message
news:tb*******************@nwrddc01.gnilink.net...
"B Love" wrote
> I would like to display a drop-down
> list on a form conditional on the value
> of another field on the same form. I am
> not sure if this is good form or not.
It is considerate to your users (so they don't have to be confused by

extra information) and that is a good thing.
> I am using Access97, but have access to 2000 also.
It'll work just fine in any version of Access.
> The specific scenario is this: I have 2 fields
> on a form. One is called "Manufacturer."
> The other is called "ProductLine." I would
> like to display specific product lines of the
> selected Manufacturer. Now, here's the bad
> news: my SQL and VB is pretty weak.
> Can I do what I would like to do?


Along with your Access 97, there came an example database called
"Solutions.MDB". Unless you did something to prevent it, you'll find it
installed in the Samples subfolder of the Office subfolder in the folder
hierarchy where you installed Microsoft Office. As a first try, look in
"Program Files", "Microsoft Office".

Open that, look at "Working with Combo and List Boxes" and you'll see a
discussion and example of exactly what you describe. You may be able to

copy and paste, but I think you'll find it so simple that you can just create
your own.

Don't sweat the SQL... I've never used a Combo or List Box for which I could not create the Query for its Row Source in the Query Builder -- drag and
drop. Don't sweat the VBA, because most of what you need will be to put in the AfterUpdate event of the first Combo Box, a simple

cboProducts.Requery

Overview: You create your first Combo Box, cboManuf for selecting the
Manufacturer in the standard, usual way. Then you create another for
selecting Product, cboProduct, in the normal way, with as a criteria for the Manufacturer ID (foreign key) in the Products table, you code =
Forms![frm<nameofyourform>]![cboManuf]. That's pretty much it.

Larry Linson
Microsoft Access MVP

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.