I am trying to construct a database with Access 2002 to keep articles from a magazine to a usable archive.
Each articles has to be in a Category. Each category has many subcategories.
My problem is that when I insert a new article in the database I have to choose between all the subcategories even though i already selected a category.
Is there a way to see only the appropriate subcategories for each category i choose during the data entry?
Is it the relations between the tables Categories and Subcategories?
The common field between tables Categories and Subcategoris is called Category.
I use a form to enter Articles.
Yes, I want to filter subcategories when I insert a new Article in the database, in order to be able to choose between them according to the Category already chosen.
I downloaded your file and noticed some interesting naming conventions, I suspect that since I am still using 2000 it may be a lack of backward compatibility.
I use a Category and Sub Category relationship in a Check Book Register the Sub Category Row Source is updated on the Categories AfterUpdate Event. In the property view of your Category Combo Box select the Event Tab and enter a "[" in the After Update field. You will note "[Event Procedure]" is automatically inserted press the "..." button to the right this will automatically create a sub routine header and footer.
Insert the following:
Dim strSQL as String
strSQL = "SELECT Category, SubCatName FROM SubCategories ORDER BY SubCatName"
Please note that you may want to have both your Category and SubCatName as key fields in your table SubCategories. There may arise a situation where you have duplicate Sub Categories between different Categories, your current table setting will not allow for this.
Substitute cboSubCatName with the name you have selected for your combo box, the file that I downloaded was some what encrypted (Backward compatability). I could not read the name you provided for your combo box.