Hi,
Please, I could use som help with a access 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 -but the file works fine on my desktop:
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. So I am not too sure what is going on there. The code is in an Excel moduel which 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.
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") = "XXXXXXX"
adoConn.Open pDatabase
Connect = True
Exit Function
err_Connect:
Connect = False
End Function
I user the logged windows user name to validate the user in both excel and access. But I think somehow this is not connecting.
Thanks
Please, I could use som help with a access 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 -but the file works fine on my desktop:
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. So I am not too sure what is going on there. The code is in an Excel moduel which 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.
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 user name to validate the user in both excel and access. But I think somehow this is not connecting.
Thanks