Using a (v old!) Access app with Access 2003 (DAO)

  • Thread starter Thread starter Fionnbarr Kennedy
  • Start date Start date
F

Fionnbarr Kennedy

Hi all
having just installed Access 2003 how do I use DAO? I
am referencing Visual Basic for Applications and Microsoft
DAO 3.6. The code is falling over on Recordsets. I know
they are (way!) out of date but there are Hundreds in my
application and I dont have the time to re write. Is
there another reference I'm missing?

The app runs fine until it needs a recompile when it falls
over.

Many Thanks

Fionnbarr
 
Since you already have your DAO reference set, try "dis-ambiguating" your
code when using DAO objects. For example:

Dim rs as DAO.Recordset
Dim qdf as DAO. QueryDef 'etc

or, in the list of references, move the DAO reference so that it is listed
before any ADO reference.


hth,
 
I haven't installed A2003, but others have posted that the reference to DAO
is back in the lineup (so to speak), so you should already have the
reference. There may also be a reference to ADO in your references list
(which you can reference by clicking Tools - References from the VBE code
window). If you use DAO EXCLUSIVELY then you can uncheck the refence to ADO
(and, again, I don't have A2003 so I'm assuming no ill will come from this),
OR you can place DAO higher in the list of references (above ADO). Of
course, the better course of action is to go through the code and
disambigulate the references:

Dim dbs AS DAO.Database
Dim rs AS DAO.Recordset
Dim rst AS ADODB.Recordset
etc etc

It's a lot of work, but it will clear up a host of problems when upgrading
to new versions.
 
Back
Top