P
Pat Randall
What is the most efficient way to open multiple DAO recordsets residing
in the same database (Access 2000)
Do you have to declare separate Database objects for each recordset or
can you use just one?
Example Option 1:
Dim db as Database
Dim rs1 as Recordset
Dim rs2 as Recordset
Dim rs3 as Recordset
Set db = CurrentDB
Set rs1 = db.OpenRecordset("SampleName1", DBOpenDynaset)
Set rs2 = db.OpenRecordset("SampleName2", DBOpenDynaset)
Set rs3 = db.OpenRecordset("SampleName3", DBOpenDynaset)
-or-
Example Option 2:
Dim db1 as Database
Dim db2 as Database
Dim db3 as Database
Dim rs1 as Recordset
Dim rs2 as Recordset
Dim rs3 as Recordset
Set db1 = CurrentDB
Set db2 = CurrentDB
Set db3 = CurrentDB
Set rs1 = db1.OpenRecordset("SampleName1", DBOpenDynaset)
Set rs2 = db2.OpenRecordset("SampleName2", DBOpenDynaset)
Set rs3 = db3.OpenRecordset("SampleName3", DBOpenDynaset)
Thank you.
in the same database (Access 2000)
Do you have to declare separate Database objects for each recordset or
can you use just one?
Example Option 1:
Dim db as Database
Dim rs1 as Recordset
Dim rs2 as Recordset
Dim rs3 as Recordset
Set db = CurrentDB
Set rs1 = db.OpenRecordset("SampleName1", DBOpenDynaset)
Set rs2 = db.OpenRecordset("SampleName2", DBOpenDynaset)
Set rs3 = db.OpenRecordset("SampleName3", DBOpenDynaset)
-or-
Example Option 2:
Dim db1 as Database
Dim db2 as Database
Dim db3 as Database
Dim rs1 as Recordset
Dim rs2 as Recordset
Dim rs3 as Recordset
Set db1 = CurrentDB
Set db2 = CurrentDB
Set db3 = CurrentDB
Set rs1 = db1.OpenRecordset("SampleName1", DBOpenDynaset)
Set rs2 = db2.OpenRecordset("SampleName2", DBOpenDynaset)
Set rs3 = db3.OpenRecordset("SampleName3", DBOpenDynaset)
Thank you.