I have the SQL below that will provide the MaxOfRptDt for a Report.
I want to take the MaxOfRptDt value from the above strSQL and pass it to another strSQL, replacing Date()-3 with MaxOfRptDt.
A function that would return the MaxOfRptDt value from the first strSQL is my first guess. And then pass that to the 2nd strsql.... but I need help.
Thank you
Du2good
Code:
SELECT tblReportDates.Report, tblReportDates.Action, Max(tblReportDates.RptDt) AS MaxOfRptDt
FROM tblReportDates
GROUP BY tblReportDates.Report, tblReportDates.Action
HAVING (((tblReportDates.Report) Like "*CSH06") AND ((tblReportDates.Action)="Finish"));
Code:
"SELECT tblAccount.PI_id, tblAccount.External_Status_cd, tblAccount.Fraud_dt " & _
"INTO Strqry & " & _
"FROM tblAccount " & _
"WHERE (((tblAccount.Fraud_dt)>=Date()-3));"
A function that would return the MaxOfRptDt value from the first strSQL is my first guess. And then pass that to the 2nd strsql.... but I need help.
Thank you
Du2good