Article ID: 138769
Article Last Modified on 1/19/2007
Public Function testLink()
Dim myDb As DATABASE, rstCustomers As Recordset
' Open the Northwind.mdb database.
Set myDb = DBEngine.Workspaces(0).OpenDatabase("Northwind.mdb")
' Create the recordset.
Set rstCustomers = myDb.OpenRecordset("Customers", dbOpenDynaset)
End Function
Microsoft Access 2.0:
Public Function testLink()
Dim myDb As DATABASE, rstCustomers As Recordset
' Open the Northwind.mdb database.
Set myDb = DBEngine.Workspaces(0).OpenDatabase("Northwind.mdb")
' Create the recordset.
Set rstCustomers = myDb.OpenRecordset("Customers", DB_OPEN_DYNASET)
End Function
In Microsoft Access 1.x:
DIM MyDB as Database
DIM MyDynaset as Dynaset
Set MyDB = OpenDatabase("NWIND.MDB")
Set MyDynaset = MyDB.CreateDynaset("Customers")
Option Explicit
Function Test()
Dim db as Database
Dim mySet as Recordset
' In versions 1.x and 2.0, dimension mySet as table.
' Dim mySet as table.
Set db = CurrentDB()
' Create the recordset based on the Customers table.
Set mySet = db.OpenRecordset("Customers", dbOpenTable)
' In version 2.0, use the following line to set mySet
' Set mySet = db.OpenRecordset("Customers",db_Open_Table).
' In version 1.x, use the following line to set mySet.
' Set mySet = db.OpenTable("Customers")
End function
? Test()
131829 ACC: How to Use the Seek Method on Linked Tables
Additional query words: can t 3219
Keywords: kberrmsg kbprb kbprogramming KB138769