Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ConnectionString Property [Access 2003 VBA Language Reference]

Office 2003

You can use the ConnectionString property returns the base connection string for the DataAccessPage object. Read/write String.

expression.ConnectionString

expression Required. An expression that returns one of the objects in the Applies To list.

Remarks

The ConnectionString property is available only by using Visual Basic and is read-only.

The ConnectionString property returns the connection string that was set through the OpenConnection method or by clicking Connection on the File menu. When making a connection, Microsoft Access project modifies the ConnectionString property for use with the ADO environment. The Microsoft Office Data Source Control (MSODSC) likewise modifies the ConnectionString.

Example

The following example displays the ConnectionString property setting of the currently active data access page:

Dim objCurrent As Object
Set objCurrent = Application.DataAccessPages(0)
MsgBox "The current base connection is " _
    & objCurrent.ConnectionString
		




Show:
© 2015 Microsoft