Refresh link with vba code using ADO

  • Thread starter Thread starter Guest
  • Start date Start date
i tried this code but there was problem with this statement
Dim dbCurr As DATABASE, dbLink As DATABASE
i am unable to declare/create database object..
 
i just tried it on another machine. it did work....
but problem is that i have multiple databases at the back end. i have number
of tables linked from these different databases.... how to refresh them all
using this code?
 
That means that the database into which you put the code doesn't have a
reference set to DAO.

Go into the VB Editor, select Tools | References from the menu bar, scroll
through the list of available references until you find the reference for
Microsoft DAO 3.6 Object Library, select it and back out of the dialog.

The issue you mention about having multiple backends is something you're
going to have to figure out whether you use DAO or ADOX. You're going to
need to have some way of knowing which table links to which backend, and
then set the Connect property accordingly.
 
Back
Top