General information
Title:
Error passing a parameter to Data Report
The following code passes a parameter to a Data Report and runs the report.
Private Sub Command1_Click()
' Pass datetime stamp to Data Report
RptKey = Data1.Recordset.Fields("datetime")
DataEnvironment1.Command1 RptKey
DataReport1.Show
End Sub
When I run the above report the first time, it works fine. After running it twice, I receive the following error:
Run-Time error 3705
Operation is not allowed when the object is open
The debugger highlights the DataEnvironment1 line as the error line.
I am new to Visual Basic - any help would be appreciated.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only