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
atabase 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
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
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