jerrym
Posts: 52
|
Posted: 12/25/2011, 10:07 PM |
|
hi guys
wondering if someone can help me. i've a record form called POTALL with only 1 field (DEL_DATE) that requires updating. i've an after execute update event on the form to update another table (PODALL - details table for purchase order lines) below is my code which does not appear to work ie update the PODALL table at all is there someone able to help me please.
Dim SQL
Dim Connection
Dim strPO
Dim strDate
Dim dteYear
Dim dteMonth
Dim dteDay
Dim dteYYYYMMDD
Set Connection = New clsDBConnection1
Connection.Open
strPO = Request.QueryString ("s_REF_NO1")
strDate=CCDLookup("DEL_DATE","POTALL","REF_NO1=" & DBConnection1.ToSQL(strPO, ccsText), DBConnection1)
dteYear = Year(strDate)
dteMonth = Month(strDate)
dteDay = Day(strDate)
dteYYYYMMDD = dteYear & "/" & dteMonth & "/" & dteDay
'response.Write (dteYYYYMMDD)
SQL = "Update PODALL Set DEL_DATE =" & dteYYYYMMDD & "Where Ref_No1 =" & strPO
Connection.Execute(SQL)
Connection.Close
Set Connection = Nothing
|
|
|
|