Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Project Triggers

Status
Not open for further replies.

ind

Programmer
Mar 9, 2000
121
US
Can someone please help me with an access trigger?

I am creating a database project running MSDE.
(Eventually SQL Server 7.0)

I have two tables (Orders and Customers)

Orders consist of:
WorkOrderNumber varchar (50)
Customer varchar (50)
CustomerOrderNumber varchar (50)

Customers consist of:
Customer varchar (50)

When the customer name in the customers table is edited/updated I need the customer name in the orders tables to reflect the changes.

Can someone give me an example of how to accomplish it.

Thanks you.......so much
 
In Access you can define a relationship between the two tables and enable cascading updates. The same functionality could then be coded in SQL Server as a trigger.

However, this is a no-no from a design perspective. The customer table should have a primary key that NEVER changes. Use an identity/auto number column if you don't already have a natural customer number. The order table should then carry the column as a Foreign Key. Customer Name should ONLY exist in the customer table.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top