ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Security Across Applications (https://www.excelbanter.com/excel-programming/353554-security-across-applications.html)

dok112[_83_]

Security Across Applications
 

Hey everyone, I have a Access Database a user has to log in to when
viewing the database based on security settings. I have the below code
whish is accessing the database to dump info into from a Excel Form, but
now it is giving an error message b/c of the security. I need to put
the security in force b/c I had someone try to corrupt the database.
How can I make the below code provide their login info so it will open
the database and dump the data in?

Public gcnAccess As ADODB.Connection

Sub OpenAccessConnection()

Dim sConnect As String
Dim sPath As String
sPath = ThisWorkbook.Path
If Right$(sPath, 1) < "\" Then sPath = sPath & "\"
sConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & sPath & "CARS.mdb;"

Set gcnAccess = New ADODB.Connection
gcnAccess.ConnectionString = sConnect
gcnAccess.Open
End Sub


--
dok112
------------------------------------------------------------------------
dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581
View this thread: http://www.excelforum.com/showthread...hreadid=513398



All times are GMT +1. The time now is 05:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com