Opening Access 2002 database from Word

  • Thread starter Thread starter Hans
  • Start date Start date
H

Hans

I have an old Word template which uses "OpenDatabase" to
get access to a database with e.g. contact addresses
which can then be put nicely into the word document.
I then use CreateQueryDef to select the data I need.

It has worked fine in the old days when using the
Access97 format, but as I am now using Access2002 it
cannot recognise the database format.

What is the solution? Is there an alternative method to
open the new format which will allow me to reuse the
remaing code, or must everything change?
 
If it works with Access 97 but not Access 2000 or newer, odds are you've set
a reference to Microsoft DAO 3.5x Object Library. Change that to Microsoft
DAO 3.6 Object Library under Tools | References in the VB Editor.
 
make sure you hav a reference to DAO, and move it higher in references
dialog then ADO
 
Back
Top