Catagory, Sub-Catagory, Sub-Sub-Catagory help

RyOn

New member
Local time
Today, 23:12
Joined
Apr 21, 2009
Messages
6
Hey

I have a Products table that has all the product information as well as which Category, Sub-Category, and Sub-Sub-Category it falls into.

I also have a Table of the Sub-Sub-Categories with which Sub-Category it falls into and which Category it falls into. This is where i would get the data for the products table.

How do i write the Category, Sub-Category, and Sub-Sub-Category in the products table so that I choose from a drop down menu the Category, Then choose a Sub-Category from a list of options based on the Category i chose, then choose a Sub-Sub-Category from a list of options based on the Sub-Category I chose.??

Regards
Ryan
 
I had a look, and think i found what i want(ish).

They use this code:

Private Sub cboCountry_AfterUpdate()
On Error Resume Next
cboCity.RowSource = "Select tblAll.City " & _
"FROM tblAll " & _
"WHERE tblAll.Country = '" & cboCountry.Value & "' " & _
"ORDER BY tblAll.City;"
End Sub

Do i put this in the row source?
I have tried changing the data to fit my information but i just get a error saying it doesn't start with SELECT, DELETE, INSERT.....

I enter it in the SQL bit btw
 
I can't seem to find it.
Right click over you ComboBox--> Properties -->Events Tab--> After Update
You should read a MS Access Tutorial for beginners if you can't find it. There are plenty of them all over the web.
Have a nice day. Cheers!
 
Right click over you ComboBox--> Properties -->Events Tab--> After Update
You should read a MS Access Tutorial for beginners if you can't find it. There are plenty of them all over the web.
Have a nice day. Cheers!

Thanks, I found it.

But now when i enter it and try use it, it give me a nice big error message talking about how it can't find the object.

Is what i am trying to do really complicated or something?

Because it seems like it should be pretty easy
 
No it's pretty straight forward once you get the hang of it. Have a look at some of the downloadable examples I linked to in my previous post.
 
The attached has another method of dealing with cascading combo boxes, perhaps it will help. It uses a query rather than SQL.
 

Attachments

Hey thanx guys.
I started fresh with my tables because after trying so many things i think i messed things up. and this time round i was successful.
I hope this is the worst of problems to come... :)
 
Wow Access likes to be difficult, Now the exact same code doesn't work.
Spent the last 5 hours spell checking and code checking.
I haven't even changed anything since it was working
 

Users who are viewing this thread

Back
Top Bottom