This topic is locked

Workaround for update query

1/19/2005 9:17:44 PM
ASPRunnerPro General questions
author

[email=weisec@gw-a.com]weisec@gw-a.com[/email]Trying to "dummy proof" data entry in a table. When a record is being edited and a number changes that part is part of a sum in another field, is there a way to update it?

Sergey Kornilov admin 1/22/2005

I guess you can update sum field when you update a record. Here is the sample code (..._edit.asp page).

if Right(strSQL,2)= ", " then strSQL = Left(strSQL, Len(strSQL)-2)

strSQL = strSQL & ", sumfield = " & Request.Form("Field1") & "+" & Request.Form("Field2") & "+" & Request.Form("Field3") & "+" & Request.Form("Field4") & "+" & Request.Form("Field5")