ADO connection

  • Thread starter Thread starter Atif
  • Start date Start date
A

Atif

why i am receiving this error "user defined type-notdefined" on "Dim cn As
ADODB.Connection".

i am using access 2007
 
Atif said:
why i am receiving this error "user defined type-notdefined" on "Dim cn As
ADODB.Connection".

i am using access 2007


Check your references and make sure you have a reference set to Microsoft
ActiveX Data Objects 2.x Library.
 
To go with what Dirk said, Access 2007 has DAO set as the default now and not
ADO, so if you want to use ADO code you will need to set the reference for
each new database you create in 2007. Just something to remember.
--
Bob Larson
Access World Forums Administrator

Tutorials at http://www.btabdevelopment.com

__________________________________
 
Back
Top