How to reference existing ado connection to BE

J

Jon Lewis

How do I reference an existing Connection to a seperate BE database

I'm using OpenSchema from a FE to see who's connected to a shared Access BE


Dim cnn As New ADODB.Connection
cnn.Provider = "Microsoft.ACE.OLEDB.12.0" 'both FE & BE are A2K7 but same
problem occurs with A2K*
cnn.Properties("Jet OLEDB:Database Password") = InputBox("Please enter the
data source password if applicable or leave blank.", "User Roster Utility")
cnn.Open "Data Source='" & strDataSource & "'" 'strDataSource comes from the
..Connect property of a linked table


This however creates an additional Connection to the one that already exists
so I get me (as the user) listed twice in the User Roster


If the table wasn't linked I could use CurrentProject.Connection to use the
existing Connection. How can I get the existing Connection to the BE so I
don't have to create a new one?


TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top