Opening Access 2002 database from Word

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?
 
D

Douglas J. Steele

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.
 
A

Alex Dybenko

make sure you hav a reference to DAO, and move it higher in references
dialog then ADO
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top