M
Mike
Thanks. This got me pass the original error, but now I am
getting an "Item not found in this collection" error and
the "if !rptListName = rptReportsMenu.Value Then" line is
highlighted.
What am I doing wrong? Did I mention that my VBA skills
are weak at best )
Thanks again for your time AND patience.
getting an "Item not found in this collection" error and
the "if !rptListName = rptReportsMenu.Value Then" line is
highlighted.
What am I doing wrong? Did I mention that my VBA skills
are weak at best )
Thanks again for your time AND patience.
..-----Original Message-----
Mike:
1.) If you are getting that error, then your database is not using ADO as
its data access method, rather it is using DAO. (You can check this by
going to Tools->References when in a module and looking at the reference
items. If Microsoft Data Access Objects is listed then you're using DAO.
To fix the code then change these lines:
Dim conn As ADODB.Connection
To:
Dim db as DAO.Database
Dim rstReportList as DAO.Recordset
Set db = CurrentDb()
Set rstReportList = db.OpenRecordset("tblReportList", dbOpensnapshot)
2.) That said, I'm not sure why in the double click code the first responder
provided, they even look to the table to see if the report is listed. If
the list box is populated based on the table in the first place, then the
darn report should be there, all you need is
If Len(Me!rptListName)>0 Then _
DoCmd.OpenReport Me!rptListName, acViewPreview
--
Steve Arbaugh
ACG Soft
http://ourworld.compuserve.com/homepages/attac-cg
.