Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DAO reference library

Status
Not open for further replies.

ad2

Technical User
Dec 31, 2002
186
US
Hi,

I'm getting a code error and think I may have a missing library reference. Which library would I click for DAO ?

Thanks in advance
 
Go to VBA (Alt+F11), click Tools, References. You should see a library with a check next to it called Microsoft DAO 3.6 Object Library. If not, scroll down to it, place a check next to it. Using the Up arrow, place the library about the fourth lib from the top. If it's too low, when Access does its' processing, it may run into the ADO lib first and that will cause errors.
 
Alternatively you can declare any DAO objects as DAO.<whatever>:

Dim dbs as DAO.Database
Dim rst as DAO.Recordset

That way you don't need to worry about the library's priority. I believe this method is marginally faster as well.

Ed Metcalfe.

Please do not feed the trolls.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top