We have a series of databases which we've been using successfully for a few years now, all in Access2003, which has been converted from 97 a year or two ago now. All of a sudden they've all been failing on the following bit of code:
on which I get a "Run-time error '3078' (The MS Jet database cannot find... 'Q_RUNTIMES'...)" The query 'Q_RUNTIMES' does exist, I can open it from within the database window, and it's spelled correctly within the code. I discovered, more by accident than design, that if I change the reference to the database from
to
it works again. What I don't understand is why?
Laters, Z
"42??? We're going to get lynched!
Code:
Dim DB1 As DAO.Database
Dim RS1 As DAO.Recordset
Dim SD As Date
Set DB1 = DBEngine.Workspaces(0).Databases(0)
[HIGHLIGHT]Set RS1 = DB1.OpenRecordset("Q_RUNTIMES", dbOpenDynaset)[/HIGHLIGHT]
Code:
Set DB1 = DBEngine.Workspaces(0).Databases(0)
Code:
Set DB1 = CurrentDb
Laters, Z
"42??? We're going to get lynched!