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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy a record from Table1 to Table2 via trigger/event ?

Status
Not open for further replies.

tenren

MIS
Jul 31, 2003
3
US
Hi.

To make things easier, here is the setup:
Access 2002

Table1 Table2 Table3
ItemID ItemID(Key) ItemID
Info Info Info
HistID HistID(key)

Form1 based on a query of Table1 & Table2 has a combo box "ItemID" with rowsource from Table2:ItemID.

Usage:
User enters/selects data on Form1 and then a copy of this record is stored on another table

I want to be able to "copy" ItemID & Info to Table3.
I was thinking Append Query when it is record is new in Table1 and Update Query when there already an existing record. Does this logical sense? Or is there some better way to do it?
What kind of trigger can I use? I was thinking AfterUpdate or Change on ItemID but it didn't seem to work.
Or is there some way to make Table3.ItemID = Table1.ItemID when Table1.ItemID changes?

Thanks for any help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top