Code:
Dim strSQL as string
strSQL = "UPDATE tblReceivables SET TotalDays = Date() - (SELECT max(PayDate) FROM tblReceivables as rs WHERE tblReceivables.TransactionID = rs.TransactionID) WHERE TransactionID = " & me.TransactionID & _
"And Active = -1"
Currentdb.execute strSQL
The code above should be able to update TotalDays field with the calculated value coming from current date minus latest payment date. Unfortunately, Iam encountering an error which states "You must choose an updateable query".
Is there any way i can get this update query to work? Please help me thanks.