Basic Help With Tables

richlewt

Registered User.
Local time
Today, 14:57
Joined
Apr 4, 2003
Messages
14
Hi
I am new to Access so please excuse this basic question.
I am trying to set up a database with the following functionality.
Simplified fields used for clarity.

main_table
fields:
ID
category
sub_cat1

I guess i will need 2 other tables, one for category and one for sub_category.

Now heres the bit I am stuck on. I can define a table with category items i.e. boots, helmets and gloves.
I want to now sub categorise these items
i.e. boots- walking, hiking, waterproof.
helmets- climbing, motorcycle
gloves- thin, warm, fingerless etc

When in my main table I select the boots item from the pull-down i want only the walkin, climbing and waterproof options to be available in the sub_category pull down. So the sub_category needs to dynamically change depending on what has been selected by the main category.
This is probably dead simple to you guys but any help would be greatly appreciated.
Rich
 
basically your second combobox (pull down) has to be based off your first combobox (in the query). When a selection is made in the first combobox, you have to requery the second combobox to "refresh" the data.
 
There's an example of what you want on this thread.
 
Mile-O-Phile said:
There's an example of what you want on this thread.

Many thanks for that, thats the kind of thing I need. In that exammple there are 2 tables tblContinents and tblCountries. How do you make these 2 tables populate a tblMaster from the selections made? i.e. you select asia- africa and these values need to be written to tblMaster?
Sorry if this is basic but I am really scratching my head a this one :p
 
Hi
I have had a read through the notes on cascading combo boxes and tried including the example into my simple database but no good:confused:

I have included a copy of my database in this post should anyone get 5 mins, what I am trying to achieve is the following:
On the form top right hand side there are 3 boxes
1) Categories name (db field= v_categories_name_1)
2) Sub Categorie 1 (db field= v_categories_name_2)
3) Sub Categorie 2 (db field = v_categorie_name_3)

Heres the tricky bit.
I will need to set a category for v_categories_name_1 which lets say is "Helmets" (this is a motorcycling store database)
Sub Categorie 1 may have two options say "Open Face" and "Full Face"
Sub Categorie may have say a colour option of "RED", "GREEN" or "BLUE"

The drop down offered in Sub Categorie 2 needs to be based on what is selected under Categorie. If the Categorie is say "Boots" then we dont want "Open Face" and "Full Face" coming up we want different options. likewise Categorie 2 needs to be dependant on what is set in Categories then Sub Categorie 1. Hope this is making sense.
I guess I need 3 more tables one for Categorie, one for Sub Categorie 1 and one for Sub Categorie 2.
The values selected from the pull downs need to be written into my main stocklist database.
Is all this something that is easy to achieve or is it something I need to think about commissioning someone to write?
I have had a go on my own for a week now but have failed :-(
 

Attachments

Hi
Major apologies for continual posting but its driving me mad!! I have added all relevant tables now and am just short on how to write the query for v_categories_name_2 which needs to get its values from what is selected in the column imediately before it in v_categories_name_1.
If anyone could put me out of my misery i will promise not to pester you all again.:p
I have uploaded it to my webspace at http://www.lewtcentral.pwp.blueyonder.co.uk/
file size is 137 kb slightly to big to post here.
Many thanks
 

Users who are viewing this thread

Back
Top Bottom