Cascade Clarification Please

  • Thread starter Thread starter golfinray
  • Start date Start date
G

golfinray

I think I have a pretty good general idea how to set up what I want to do but
I'm still a little fuzzy. I have a table with ID, Category, Sub category. On
a form, I want to pick the category and that pick is stored in the table,
THEN pick the subcategory and that pick is also stored in its field in the
table. So, a manager picks a type of construction project (like maybe
roofing), then picks shingles, or 4 ply, or whatever. If the manager picks
HVAC in the first combo, he then picks roof mount, ground mount, chiller,
etc. The record in the table will then indicate the managers picks. Thanks a
bunch!!!
 
Karl, I have searched and searched. Most all of them, though, show using
queries. I don't want to have a query, I want to save whatever they pick
directly into a record in a table. So if I have a table with ID, category,
subcategory and I use two bound combos, how do I set up the selection?
 
Karl, I have searched and searched. Most all of them, though, show using
queries. I don't want to have a query, I want to save whatever they pick
directly into a record in a table. So if I have a table with ID, category,
subcategory and I use two bound combos, how do I set up the selection?
--

By using a Query.

Golfinray, if you don't want to use queries... *then you don't want to use
Access*! Queries are the life blood of the program; you will be using queries
*ALL THE TIME* in Access.

What you need to do with a query in this case is to base the second combo box
*on a Query* which returns the records that you want. Assuming that your
subcategory table has fields for ID, CategoryID, Subcategory (so that you can
tell which category each subcategory belongs to), you would use a Query such
as

SELECT ID, Subcategory FROM Subcategories
WHERE Subcategories.CategoryID = Forms!yourformname!catagorycombo
ORDER BY Subcategory;

You would then Requery the subcategory combo box in the AfterUpdate event of
the Category combo box, to "wake it up" to the fact that its rowsource has
changed.
 
The way I see it is like this.
Project ProjID
AirCond 1
Roof 2
DrvWay 3

ProjID Type TypeID
1 ReFrig 1
1 Evap 2
2 Flat 3
2 Tile 4
2 Slate 5
2 Shingle 6

TypeID Xyyy AbcID
1 Window 1
1 Split 2
2 Roof 3
2 Side 4

On Update event macro Requery combo2. The SQL for combo2 uses combo1 as
criteria. On so forth.

-
Build a little, test a little.
 
Back
Top