the Manx Man's MS Access Tips Pages
need professional help with a database?
I use DAO exclusively. I have NEVER used ADO. What is DAO? It is an acronym for Data Access Objects. The most important function of DAO is to provide you with a way to manipulate your data. The most common DAO object that you will see in my examples is the recordset object. Example.
If you start up Access 2000 and type the above code into a VBA module in a new database, it will not work. Why? Because, by default, Access 2000 does not turn DAO on. You have to do that. Just open up your VBA editor, go to the Tools menu, choose References, check off the ADO entry, find DAO 3.x, check it on, and exit the dialogue box. Now the code will work. If you need to use both ADO and DAO, explicitly declare DAO references.
|