hi,
i use the following code when opening a report. the first time its opens fine, but when i close the report (the program keeps running), and i try to open the report aaagain, i get a error message:
error: the microsoft jet databses engine cannot find the table or query "command1".
Wht am i doing wrong or how can i avoid this.

Private Sub cmdView_Click()
DataEnvironment.Connection1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbpth & ";Persist Security Info=False"

DataEnvironment.Connection1.Open
Set DataReport1.DataSource = DataEnvironment
DataReport1.DataMember = "command1"
DataReport1.Show vbModal
DataEnvironment.Connection1.Close
Set DataReport1.DataSource = Nothing
DataReport1.DataMember = ""
End Sub