I usually do this....
 
Option Explicit
Public DBCN As New ADODB.Connection
Public DBRS As New ADODB.Recordset
 
Function Open_DemoRecall_Tbl()
On Error Resume Next
DBCN.Close
DBCN.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\database\DRC_TUFTS.mdb;User Id=sa;Password=xxx123"
End Function
Vince Swisher
Lahey Clinic
Burlington, MA
781-744-3112
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Brooks, Eric
Sent: Tuesday, November 30, 2004 12:42 PM
To: [EMAIL PROTECTED]
Subject: RE: [Talk] Using CreateObject to Open Access

See if this works for you.
 
Private dbMdb As Database
Private wsMdb As Workspace
 
Set wsMdb = CreateWorkspace("", "Admin", "", dbUseJet)
Set dbMdb = OpenDatabase(App.Path & "\passwords.mdb", False, False, "MS Access;PWD=xx.123")
 
Thanks
Eric Brooks
(931) 551-1992
 
Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
-----Original Message-----
From: Gloria Mallory [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 30, 2004 11:18 AM
To: '[EMAIL PROTECTED]'
Subject: [Talk] Using CreateObject to Open Access

Our Access databases require a password since we use the workgroup administrator.  Is there any way to code for this in Boston Workstation?

 

Thank you.

 

Gloria Mallory

Good Shepherd Medical Center

903 315-5120

[EMAIL PROTECTED]

 

See our web page at http://www.lahey.org for a full directory of Lahey sites, staff, services and career opportunities.

THIS MESSAGE IS INTENDED FOR THE USE OF THE PERSON TO WHOM IT IS ADDRESSED. IT MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM DISCLOSURE UNDER APPLICABLE LAW. If you are not the intended recipient, your use of this message for any purpose is strictly prohibited. If you have received this communication in error, please delete the message and notify the sender so that we may correct our records.

Reply via email to