I have this code in a database that works just fine. I moved it into a new database I'm working on and it throws this error.
The only difference I can see is in the references with Microsoft DAO 3.6 Object Library. The database that works has this checked. The one that throws the error does not.
I tried to enable this in the new DB and I get the error:
"Name Conflicts with existing module, project, or library.
It's not already selected in the preferences window. How do I track this down?
Public Function getRows(tbl As String)
Dim qdf As DAO.QueryDef
Dim db As Database
Set db = CurrentDb()
Set qdf = db.QueryDefs(tbl) >>>>>>>> Error's Here
r = qdf.OpenRecordset.RecordCount
Set rs = Nothing
Set db = Nothing
getRows = r