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

primary key of the last changed record

Status
Not open for further replies.

delpino

Programmer
Dec 29, 2000
17
0
0
GB
I want to program a code which changes a subform after the product_id has been entered or changed. I use "After Update" (Event Procedure). For the necessary SQL statements I need to know the primary key of the last changed record. How do I get that?
 
Yeah, but how depends on how everything is set up. This is obviously through a form, and the record is edited (I assume by last edited record you mean the last record the current user edited right?) can't you reference a field on the form? So the product_id is changed and then on the main form can't you reference a field linked to the product_id? Kyle [pc1]
 
Put some code in the BEFORE update event. Just save the PK -or enough info to find the record. ONE approach might be to add a field to hold the Update time. Save this and then lookup PK of the record with the same time. If this is not sufficient (AND you are using security), include the username and lookup for both.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top