Jim Lawrence (AccessD)
accessd at shaw.ca
Fri May 2 16:51:07 CDT 2003
Access VB questionHi Jarad: Assuming you are using ADO-OLE and have your MS Recordset object Library attached here is the code I would use: Public Sub GetConnected() Dim gconROD As ADODB.Connection Dim gstrConnection As String Dim gsDBPFName As String On Error GoTo Err_GetConnected gsDBPFName = \\Myserver\MyDBDirectory\rod.mdb gstrConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Persist Security Info=False;" & _ "Data Source=" & gsDBPFName Set gconROD = New ADODB.Connection gconROD.Open gstrConnection Exit_GetConnected: Exit Sub Err_GetConnected: ShowErrMsg ("GetConnected") Resume Exit_GetConnected End Sub This is of course overly simplified but... HTH Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Huffman, Jarad B. Sent: Friday, May 02, 2003 9:22 AM To: accessd at databaseadvisors.com Subject: [AccessD] Access VB question Does anyone know how to programmatically open an access database in VB, bypassing the startup options? Jarad Huffman Applications Support Analyst Information Systems McDonough District Hospital Macomb, IL 61455 (309) 833-4101 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030502/ef5b6de6/attachment-0001.html>