Access 2010 Upgrade Error

PRD

Registered User.
Local time
Today, 16:14
Joined
May 18, 2011
Messages
72
Hello, we recently upgraded Access from Access 2000 to Access 2010 (please forgive us for not upgrading intermediate versions of Access but we are a non-profit organization with limited funds) and I am encountering some problems which I am hoping you can help me with.


I was getting a ‘missing utility.mda’ error but managed to correct it by unchecking the ‘Utility.mda’ check-box from the References options of the Tools menu. However, now when I run the program I get the following error…


Compile error:


User-defined type not defined


The code it is referring to looks like this…


Private Sub Form_Load()


Dim dbs As Database

Set dbs As CurrentDb


For some reason it does not like my ‘dbs’ reference. This code worked fine with Access 2000, can you tell me how to fix it so it will run under Access 2010?


Also, I’m sure I will be getting other errors as I go along, is there a link you can point me to which might help me correct other upgrade errors so I don’t have to bother you all the time. Thank you for your time.
 
please forgive us for not upgrading intermediate versions of Access but we are a non-profit organization with limited funds
PRD, no one is gonna nail you to the cross for not Upgrading to the Latest version of Access.. Infact many still love and enjoy the older versions because of various features that has been deprecated.. So do not worry.. :)
Compile error:
User-defined type not defined
This error always means that the code is missing some reference to some essential Library.. Try this code..
Code:
Private Sub Form_Load()
 Dim [B]dbs As [COLOR=Red]DAO.[/COLOR]Database[/B] 
Set dbs [COLOR=Red][B]= [/B][/COLOR]CurrentDb
Also make sure you select this reference..
Microsoft DAO 3.6 object library
Also, I’m sure I will be getting other errors as I go along, is there a link you can point me to
This link should help you get started.. Good Luck..
 
Paul -

Thanks so much for your prompt reply and the tips. I will try them first thing Thursday and let you know how it goes. Thx again.
 
Paul -

Good morning, I added the Microsoft DAO 3.6 object library to the References library list and things worked fine (I did not even have to change the code to 'DAO.Database'). Thank you!

However I do have one other problem. I normally hide all of the Toolbars and Menubars because I don't want my users to access them. I have a Print function which allows my users to print reports and I use the following Runcode commands to show and hide the Printbar...

Runcode

Function Name HidPrintBar ()

or

Function Name ShoPrintBar ()

These commmands work fine in Access 2000 but don't seem to work now in Access 2010. Any thoughts. Thx.
 

Users who are viewing this thread

Back
Top Bottom