Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Conversion / February 2004

Tip: Looking for answers? Try searching our database.

Switchboard 97>2000

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Valerie - 16 Feb 2004 22:01 GMT
I have created a database based on a 97 template, but have
converted it to 2000. My problem is the switchboard. When
I try to open it, I get a VB error: "Compile error: User
defined type not defined" and it highlights two lines of
code: "Private Sub Form_Open(Cancel As Integer)" and
Dim "dbs As Database".

I haven't a clue what either of these things means nor how
to fix them. Any help would be most appreciated. My
database is otherwise finished and ready for my coworkers
to use, but we need to clear this one hurdle before I can
call it complete.

Thanks in advance.

Val
Douglas J. Steele - 16 Feb 2004 23:28 GMT
Not sure why you're getting the first error, but the second one is because
database is a DAO object, and by default, Access 2000 uses ADO.

With any code module open, select Tools | References from the menu bar,
scroll through the list of available references until you find the one for
Microsoft DAO 3.6 Object Library, and select it. If you're not going to be
using ADO, uncheck the reference to Microsoft ActiveX Data Objects 2.1
Library

If you have both references, you'll find that you'll need to "disambiguate"
certain declarations, because objects with the same names exist in the 2
models. For example, to ensure that you get a DAO recordset, you'll need to
use Dim rsCurr as DAO.Recordset (to guarantee an ADO recordset, you'd use
Dim rsCurr As ADODB.Recordset)

The list of objects with the same names in the 2 models is Connection,
Error, Errors, Field, Fields, Parameter, Parameters, Property, Properties
and Recordset

It's entirely possible that correcting that error will fix the other one as
well.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)

> I have created a database based on a 97 template, but have
> converted it to 2000. My problem is the switchboard. When
[quoted text clipped - 12 lines]
>
> Val
Valerie - 17 Feb 2004 16:39 GMT
I checked the DAO 3.6 Object Library and unchecked the
ActiveX Data Objects 2.1 Libary, but from that point
forward in your reply, I'm totally lost. (Sorry, but I am
brand new to this.) I don't have a clue what steps I am
supposed to take to "disambguate" the declarations as you
suggest.

When I made those two changes to the properties, I got a
new message in trying to view the switchboard in form
view. This time it was "Run-time error '438' Object
doesn't support this property or method." Is that because
I have not changed the declarations as you suggested, or
is something else causing this?

I get a similar message when I try to open one of my
forms, although in that instance it will go ahead and open
and then function properly.

Sorry to be such an idiot, and thanks for your help.

Val
>-----Original Message-----
>Not sure why you're getting the first error, but the second one is because
[quoted text clipped - 37 lines]
>
>.
GVaught - 17 Feb 2004 18:59 GMT
After you made the change you need to Compile the database. Return to the
Code editor window where you made the reference change and select Debug |
Compile. This will alert you to any code that may not have converted over
during the upgrade or any other missing references.

> I checked the DAO 3.6 Object Library and unchecked the
> ActiveX Data Objects 2.1 Libary, but from that point
[quoted text clipped - 78 lines]
> >
> >.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.