LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Closing Applications VBA Dabbler[_2_] Excel Programming 4 November 8th 05 02:48 PM
Using VBA to select applications... [email protected] Excel Programming 3 October 25th 05 02:36 PM
"Ignore other applications" Geoff Excel Discussion (Misc queries) 1 March 14th 05 12:27 PM
Other applications Patrick Molloy[_4_] Excel Programming 2 July 23rd 03 12:08 AM
macros for other applications Douvid Excel Programming 3 July 14th 03 02:44 PM


All times are GMT +1. The time now is 01:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"