Hi,
I am new to Access and have been asked to create a report and, using data from a SQL query and some logic, post the data into the report.
I have created the report, connected to SQL server using ADODB connection and executed the stored procedure. This part works fine.
It's the next part, I can't seem to get past. Nothing I have tried works. I want to take the value a field from the query and place the value in a field on the report.
I have tried
DoCmd.OpenReport, ReportName, acViewDesign.
This returns an error message that says "This action can't be carried out while processing a form or report event.@A macro specified as the OnOpen, OnClose, OnFormat, OnRetreat, OnPage, or OnPrint property setting contains an invalid action for the property.@When you click OK, an Action Failed"
I have changed acViewDesign to acViewPreview only to receive a different error.
If I don't use the openreport command, then I receive an error that I am trying to add a value to a read-only form.
Any ideas?
Thanks
Tina
I am new to Access and have been asked to create a report and, using data from a SQL query and some logic, post the data into the report.
I have created the report, connected to SQL server using ADODB connection and executed the stored procedure. This part works fine.
It's the next part, I can't seem to get past. Nothing I have tried works. I want to take the value a field from the query and place the value in a field on the report.
I have tried
DoCmd.OpenReport, ReportName, acViewDesign.
This returns an error message that says "This action can't be carried out while processing a form or report event.@A macro specified as the OnOpen, OnClose, OnFormat, OnRetreat, OnPage, or OnPrint property setting contains an invalid action for the property.@When you click OK, an Action Failed"
I have changed acViewDesign to acViewPreview only to receive a different error.
If I don't use the openreport command, then I receive an error that I am trying to add a value to a read-only form.
Any ideas?
Thanks
Tina