The code demonstrates both ADO and DAO methods. If you want to use the ADO
method, you'll need a reference (select References from the Tools menu in
the VBA IDE) to the Microsoft ActiveX Data Objects 2.x Library, while if you
want to use the DAO method you'll need a reference to the Microsoft DAO 3.6
Object Library. From your description, you probably have the ADO reference
already, so if you want to use ADO you could just delete or comment out the
DAO demonstration. You may find the following link helpful ...
http://www.mvps.org/access/bugs/bugs0031.htm
--
Brendan Reynolds (MVP)
"Sameer" <sameer75@gmail.com> wrote in message
news:1124967320.736661.101940@g49g2000cwa.googlegr oups.com...[color=blue]
> Thanks for help!
> When I tried to implement some code it gives an error
> 'User-defined type not defined' for the statement
> Dim db As DAO.Database
>
> Also the DAO.Database class is not available in Object Browser.
> May I need to take references like VB?
> What I have to do for successful compilation and making this class
> available for the coding?
> Please help.
> -Sameer
>[/color]