mikeythomas
Technical User
Afternoon All,
I was wondering if someone could help as its driving me crazy.
I have a report (rptLetterAll) after I click a command button the report is generated based on parameters that are on the same form as the button.
What i want to happen is after the reports are generated or button clicked, i need certain information from the record source of the report to be sent to tblHistory.
So this is the scenario:
cmdOK is clicked 4 letters are generated.
CaseID, Date() from qryReport (the underlying datasource of the report) are appended to tblHistory for each letter that is produced. So 4 lines are appended to the history.
I have tried using the below after DoCmd.OpenReport.....
SQL = "INSERT INTO tblHistory ([CaseID], [HistoryDate]) & _
" Values('" & CaseID & "','" & strDate & "')"
CurrentProject.Connection.Execute SQL
But cant get it working!
Any help would be appreciated.
Cheers
Mike
I was wondering if someone could help as its driving me crazy.
I have a report (rptLetterAll) after I click a command button the report is generated based on parameters that are on the same form as the button.
What i want to happen is after the reports are generated or button clicked, i need certain information from the record source of the report to be sent to tblHistory.
So this is the scenario:
cmdOK is clicked 4 letters are generated.
CaseID, Date() from qryReport (the underlying datasource of the report) are appended to tblHistory for each letter that is produced. So 4 lines are appended to the history.
I have tried using the below after DoCmd.OpenReport.....
SQL = "INSERT INTO tblHistory ([CaseID], [HistoryDate]) & _
" Values('" & CaseID & "','" & strDate & "')"
CurrentProject.Connection.Execute SQL
But cant get it working!
Any help would be appreciated.
Cheers
Mike