regards i have a Sql below i want it to be little bit conditional ;
Private Sub Form_Close()
Dim StrSql As String
StrSql = "UPDATE (SELECT Purchase.Product, Purchase.PQty, Purchase.PRunTot "
StrSql = StrSql & "FROM Purchase ORDER BY Purchase.Product, Purchase.PDate, "
StrSql = StrSql & "Purchase.BatchNo) AS PurchaseSorted SET PurchaseSorted.PRunTot "
StrSql = StrSql & "= UpdateRunSum([product],[PQty]);"
BeginRunSumUpdate
CurrentDb.Execute StrSql
End Sub
i want a condition that if PQTY > "0.000" then it should sum on Product and PQTY else if PQTY =0.000 and weight >0.000 the it should sum Product and weight
Private Sub Form_Close()
Dim StrSql As String
StrSql = "UPDATE (SELECT Purchase.Product, Purchase.PQty, Purchase.PRunTot "
StrSql = StrSql & "FROM Purchase ORDER BY Purchase.Product, Purchase.PDate, "
StrSql = StrSql & "Purchase.BatchNo) AS PurchaseSorted SET PurchaseSorted.PRunTot "
StrSql = StrSql & "= UpdateRunSum([product],[PQty]);"
BeginRunSumUpdate
CurrentDb.Execute StrSql
End Sub
i want a condition that if PQTY > "0.000" then it should sum on Product and PQTY else if PQTY =0.000 and weight >0.000 the it should sum Product and weight