This topic is locked

Update Status of Master Table

3/4/2009 3:35:38 PM
ASPRunnerPro General questions
I
inetjunk author

I have a Project Database that has a field for Project Status.

I added a Journal Table as a child of Project with a dropdown field for Status as well as a datetime stamp field.

I would like the most current journal status to update the project status field after add/update.
I would need to query the child records of this project for the most current record, then set the status of the parent table to the most current record.
Can you shed some light on this for me?

J
Jane 3/5/2009

Hi,
use After record added/After record updated events on theEvents tab to update master table.

Here is a sample:

strSQL = "update MasterTableName set Status='" & dict("Status") & "' where MasterKey=" & Session(strTableName & "_masterkey1")

dbConnection.Execute strSQL