Automatically add record to another table

esurfer

Registered User.
Local time
Today, 15:17
Joined
Jan 29, 2002
Messages
12
I have a form a user uses to add to a table "Categories". I would like to have a record automatically created in another table "Subcategories" each time a record is created in the "Categories" table. The "Categories" table and "SubCategories" table are related by the Category_ID field.

Any help is appreciated.
Thanks,
esurfer
 
I'm not sure I understand why you need to create the record in the Subcategories table at the same time. What if you don't have a subcategory yet? And what do you populate it with, without duplicating data?
If your record sources & relationships are set up correctly, you should be able to go to the ">*" record on the subform and enter the new subcategories.

Post back if you have further problems,
David R
 
Items will be added to the Item table under certain categories. Each item may then be further categorized at a later time by sub-category. When an item is created, I need to already have a sub-category associated with the category (eg. an "Uncategorized" sub-category"). To ensure this, I need to create the sub-category "Uncategorized" each time I create a new category.
 
Then you should have another subform linked to the main with the default value on your field set to "Uncategorized"
 

Users who are viewing this thread

Back
Top Bottom