OpenRecordset 97 vs 2002

  • Thread starter Thread starter MichaelK
  • Start date Start date
M

MichaelK

In 97 I could easy open recordset any way I wanted and update it:
Dim dbs As Database
Dim rs As Recordset
Dim SQ

Set rs = CurrentDb().OpenRecordset("MyTable", dbOpenTable)
or just

Set rs = CurrentDb().OpenRecordset("MyTable")
or
SQ= "SELECT MyTable.* FROM MyTable;"
'et rs = CurrentDb().OpenRecordset(SQ)
or
Set dbs = CodeDb
Set rs = dbs.OpenRecordset("MyTable", dbOpenTable)

Since I moved to 2002 it's such a headache every time I need a recordset.

Anybody can tell me what is the best way to open table for updates in 2002.

Thanks,
Michael
 
The code is essentially the same in Access 2002 and 97. What is different
is that in Access 2002 the default library is set as a reference to ADO and
one must remember to manually set a Reference to DAO (Microsoft DAO 3.6
Object Library). In addition, unless you delete the reference to ADO, it
is recommended that you code this way:

Dim dbs as DAO.Database
Dim rs as DAO.Recordset
<etc. >
 
Back
Top