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 bkrike 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.
 
Hi ind,
I don't know if there's an easier way than these to do it in MSDE, but here are a couple ways to do it in Access 97, Professional..

1) Link the Customer Name fields in the Relationships window and set the referential integrity to Cascade Updates (don't know if this can carry over to SQL Server, though)

2) (Recommended): I would highly recommend just referencing customers in the Orders table by customer number. There should be an ID field in the Customers table, which you can use to link the two tables. This will save space and eliminate the need to perform any updates to the Orders table when a customer name is updated.

Please let me know if you have any questions on either of the above, and I'll try to help :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top