Working in Access 2007. I have a form with an unbound text box which populates reports via a query:
SELECT MsysObjects.Name, MsysObjects.Type
FROM MsysObjects
WHERE (((MsysObjects.Type)=-32764) AND ((Left$([Name],1)) Not Like "x*"))
ORDER BY MsysObjects.Name;
The users can choose a report to view by double clicking on it. This is the event:
Private Sub lstReports_DblClick(Cancel As Integer)
DoCmd.OpenReport Me.lstReports, acViewPreview, acViewNormal
DoCmd.Close acForm, "Reports Menu"
End Sub
When this event is triggered, an error message:
“ Database engine could not find object ‘0’”
Can’t figure out what is happening. Help much appreciated…
BDM
SELECT MsysObjects.Name, MsysObjects.Type
FROM MsysObjects
WHERE (((MsysObjects.Type)=-32764) AND ((Left$([Name],1)) Not Like "x*"))
ORDER BY MsysObjects.Name;
The users can choose a report to view by double clicking on it. This is the event:
Private Sub lstReports_DblClick(Cancel As Integer)
DoCmd.OpenReport Me.lstReports, acViewPreview, acViewNormal
DoCmd.Close acForm, "Reports Menu"
End Sub
When this event is triggered, an error message:
“ Database engine could not find object ‘0’”
Can’t figure out what is happening. Help much appreciated…
BDM