I have a SQL statment in a string variable (strSQL) in Access/VBA and i am trying to overwrite a query stored in MS Access Querys section (query name = qryInterests).
I think that Access 2000 defaults to using ADO. The code that I wrote was in DAO.
Change the code like this:
dim db as DAO.database
dim qdf as DAO.querydef
Also, make sure that a reference is set to the Microsoft DAO 3.51 Object Library (you can set it the 3.6 library instead). You can find the references when opening a VBA module and choosing Tools-> References, then scroll down until you find the MS DAO 3.51 Object Library.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.