June 1999
Intermediate to advanced
1368 pages
29h 45m
English
You first need to open a connection to a database. As in DAO, creating a reference to a database is pretty straightforward in ADO.
Connecting to the current database (or project, as is popular in Access 2000) is the easiest of all. To perform this task, you use the CurrentProject object, which is a property of the Application object. The CurrentProject object has a Connection property, which you assign to a Connection object. You can see this in the following code, which prints the ConnectionString property to the Immediate window:
Sub DisplayLocalConnection() Dim cnnLocal As ADODB.Connection Set cnnLocal = CurrentProject.Connection Debug.Print cnnLocal.ConnectionString End ...
Read now
Unlock full access