ADO connection

A

Atif

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

i am using access 2007
 
D

Dirk Goldgar

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.
 
B

boblarson

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

__________________________________
 
Top