A
Alex
I'm trying to do the following to get total for textbox on
a formfoot of a continious form:
Dim rst1 As DAO.Recordset
Dim rst2 As DAO.Recordset
Dim strCode As String ' Form is linked with strCode table
to be able to edit data there.
Set rst1 = OpenRecordset("SELECT ([StaffDay]*[ShiftDay]+
[StaffAFT]*[ShiftAFT])*[Rate] AS LabourDol" _
& " FROM " & strCode & " INNER JOIN tblRate ON [" &
strCode & "].[Rate Code] = tblRate.[Rate Code]")
It's working. But, I need a sum of these records.
Is it possible to get Sum of LabourDol to assign it to
textbox on the formfoot?
Something as Set rst2 = OpenRecordset(Sum(rst1.LabourDol))
Thanks
a formfoot of a continious form:
Dim rst1 As DAO.Recordset
Dim rst2 As DAO.Recordset
Dim strCode As String ' Form is linked with strCode table
to be able to edit data there.
Set rst1 = OpenRecordset("SELECT ([StaffDay]*[ShiftDay]+
[StaffAFT]*[ShiftAFT])*[Rate] AS LabourDol" _
& " FROM " & strCode & " INNER JOIN tblRate ON [" &
strCode & "].[Rate Code] = tblRate.[Rate Code]")
It's working. But, I need a sum of these records.
Is it possible to get Sum of LabourDol to assign it to
textbox on the formfoot?
Something as Set rst2 = OpenRecordset(Sum(rst1.LabourDol))
Thanks