User defined type not defined

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there something wrong with this declaration, I am getting the below error
message for dim db as database
Compile error:
User defined type not defined
 
You need to add a reference (Tools, References in the VBA editor) to
Microsoft DAO 3.6 Object Library.
 
Check your reference, if you have reference to Microsoft DAO 3.6
(to do that, open code, anywhere, select tools > reference > and add it from
the list)

And change the code to
Dim db As Dao.Database
Dim rec As Dao.Recordset
 
Back
Top