I'm trying to update a table (DEPARTMENT) with data calculated in an unbound control in a report grouping/summary section (TOTAL USABLE SQUARE FEET). I've read numerous topics which hint at the following solution. The code would be placed in the group section print event:
Dim qdf As QueryDef, strSQL As String
strSQL = "UPDATE Departments SET Departments.TotalUSF = ????"
strSQL = "WHERE (((Departments.DeptID)=???));"
Set qdf = dbs.CreateQueryDef("DeptTotalsUpdate", strSQL)
Docmd.???
First of all, am I on the right track? If so, I'm not sure what code to put in lieu of the question marks ??????. If I'm not on the right track, please point me in the right direction. Thanx!
Dim qdf As QueryDef, strSQL As String
strSQL = "UPDATE Departments SET Departments.TotalUSF = ????"
strSQL = "WHERE (((Departments.DeptID)=???));"
Set qdf = dbs.CreateQueryDef("DeptTotalsUpdate", strSQL)
Docmd.???
First of all, am I on the right track? If so, I'm not sure what code to put in lieu of the question marks ??????. If I'm not on the right track, please point me in the right direction. Thanx!