Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Connection Error

Status
Not open for further replies.

penndro

Technical User
Jan 9, 2005
108
US
I could use some help with a vba database connection error. I have a few users who copied the database to their desktops but for some reason they are getting this runtime error:

Run-time error '-2147217865 (80040e37);
The Microsoft Jet database engine cannot find the input table or query "User_Table'. Make sure it exists and that its name is spelled correctly.

The table does exist in the database. It works for some people and for some it is not. I user MS Access 2003 so my macros are enabled. Some have to manually enable but even when they do it is not working.

I am using excel to pull data from Access. The data is restricted by user type so that is why it is first looking for user table.

Any help would be appreciated.

I saw something about DNS-Less Connections but don't know about this.

Here is my connection code:

Public Function GetWindowsName() As String
GetWindowsName = Environ("USERNAME")
End Function

Public Function Connect(pDatabase As String) As Boolean
On Error GoTo err_Connect
adoConn.Provider = "Microsoft.Jet.OLEDB.4.0"
adoConn.Properties("Jet OLEDB:Database Password") = "gemba#2011"
adoConn.Open pDatabase
Connect = True
Exit Function
err_Connect:
Connect = False
End Function

I user the logged windows name to validate the user in both excel and access.

Thanks


 
Have you looked for a common thread in those that are having the issue(s)? I mean, perhaps it's a permissions issue?

However, the error message you're mentioning doesn't sound like a permissions issue nor related to any connection code, assuming that table is a local table.

Is it a local table in the same database, or is this a split database? Also, if it's a split database, I'm assuming the back-end is on a file server of some sort. That's where the permissions issue could come in - if some users don't have access to the folder.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top