Access 2007 doesn't have a reference set to ADO by default. Presumably
there's something in the book explaining to you how to go into the
References dialog and add the necessary reference.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
>I have been attempting to establish a remote connection to another database
> on my hard drive using a DIM statement within a form module (This is
[quoted text clipped - 16 lines]
>
> Has anyone else out there met and solved this problem? Help!
kellmich - 27 Mar 2008 19:52 GMT
No it doesn't. I successfully used ADO to establish a local connection to
the current application database. My problem has been with remote connection
to a different database (different .accb).
> Access 2007 doesn't have a reference set to ADO by default. Presumably
> there's something in the book explaining to you how to go into the
[quoted text clipped - 20 lines]
> >
> > Has anyone else out there met and solved this problem? Help!
kellmich - 27 Mar 2008 21:12 GMT
Just to provide some further clarification:
The DIM I used to successfully make a local connection was:
DIM localConnection as ADODB.Connection
The only thing I have seen regarding providing reference is a code example I
found out in the help facility and adapted as follows:
Dim RemoteConnection As Object ' Declare variable in form gen. declaration
Set RemoteConnection = CreateObject("ADODB.Connection") 'in load event
This was of course guessing because that is what I'm reduced to at this
point. It didn't work. I got the same error (user defined type not defined).
> Access 2007 doesn't have a reference set to ADO by default. Presumably
> there's something in the book explaining to you how to go into the
[quoted text clipped - 20 lines]
> >
> > Has anyone else out there met and solved this problem? Help!
George Nicholson - 28 Mar 2008 00:14 GMT
Huh?
Are you saying that
Dim RemoteConnection As ADODB.Connection
raises a "User defined type not defined" error but that
DIM localConnection as ADODB.Connection
does not raise an error? In the same database file? I don't think that's
possible.
In the VB Editor: Tools>References. Is there a reference to ADO checked (aka
Microsoft ActiveX Data Objects x.x Library)? Does it have "MISSING" next to
it?

Signature
HTH,
George
> Just to provide some further clarification:
>
[quoted text clipped - 40 lines]
>> >
>> > Has anyone else out there met and solved this problem? Help!
kellmich - 28 Mar 2008 01:22 GMT
Yes George, that's exactly what I'm saying. I did the local connection and
the remote connection to the same .accdb file. The former from within that
databases application; the latter from another application.
I have a number of entries for ADO in the tools menu, each referencing a
different library version; however none of their checkboxes are clicked and
there is no "missing" notation next to any of them.
Thanks for the response, I look forward to hearing from you again.
> Huh?
> Are you saying that
[quoted text clipped - 52 lines]
> >> >
> >> > Has anyone else out there met and solved this problem? Help!
kellmich - 28 Mar 2008 01:52 GMT
You asked me the right questions George. I investigated further and noticed
that the application that I used the local connection for had ADO 2.1 library
checked while my other application in which I was trying to remotely connect
to the former (application with the local connection) did not have that
library referenced. I checked it off and everything worked great. Thanks so
much.
Mike Kelly, Logikel Solutions
> Huh?
> Are you saying that
[quoted text clipped - 52 lines]
> >> >
> >> > Has anyone else out there met and solved this problem? Help!