Method Failure

jkfeagle

Codus Confusious
Local time
Today, 04:47
Joined
Aug 22, 2002
Messages
166
I have created a Db used by a large number of folks in our office. I have recently been made aware that on a couple of the computers, they are getting the following error:

Method 'CurrentDb' of object '_Application' failed

It is in response to the code:

Dim rstUserInfo As DAO.Recordset, sUser As String
Set rstUserInfo = CurrentDb.OpenRecordset("T_User_Table")


I have gone into the References menu and verified that they have Microsoft DAO 3.6 Object Library selected. Is there something else I'm missing that I should be looking for? Any help would be greatly appreciated as time is becoming critical in resolving this issue.
 
One thing to try is to set a Database object to the CurrentDb and use that when opening the recordset. So:


Dim myDb As Database, rstUserInfo As DAO.Recordset, sUser As String
Set myDb = CurrentDb
Set rstUserInfo = myDb.OpenRecordset("T_User_Table")
 
I'm not 100% on this but would suggest you do something like

Dim db as DAO.database

set db = currentdb
Set rstUserInfo =Db.OpenRecordset("T_User_Table")
 
Sorry for the double post. I got a message saying you must wait 30 seconds between posts????
INFO removed.
 
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("T_User_Table, dbOpenDynaset)
 
Appreciate the suggestions. I'll give them a try. I'm curious though. Since this is only cropping up on a couple out of several computers/users, does this not point more to a settings issue at the references level or something similar?
 
A reference issue will be specific to the library that threw the error so I think the suggestions provided might be your answer.
 

Users who are viewing this thread

Back
Top Bottom