Kamis, 29 Oktober 2015

[MS_AccessPros] Design Question

 

I have 2 tables:

Product Category

Product


The Product Categories table primary key is the product category. The Product table has a field Product Category that refers to the Product Category table.

If a user changes or deletes the primary key in the Product Categories table, this would affect the Product table, because the product category would no longer be valid.


My question is:

is there a way in Access in the design of the table to not allow or to warn the user not do this?. Or must I write VBA code to check all the tables that are using Product Category?.


This is just one small example, I have State and Country tables that are used in many other tables. If the user changes the primary key in the table, I would have to remember all the tables that refer to the State and Country tables and check all of them to see if the code is any of the entries in those tables and then warn the user no to change/delete the entry.


Is there a way to do this 'automatically'?


Sarah


__._,_.___

Posted by: sarahk@schemesoftware.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (18)

.

__,_._,___

Tidak ada komentar:

Posting Komentar