Solved

VBA changes from Access 2003 to 2010 ?

Posted on 2010-11-26
5
736 Views
Last Modified: 2012-06-22
Hi

The (big) bank I'm currently contracting for is planning a huge leap (of faith) from Windows XP and Office 2003 to Windows 7 and Office 2010. I have developed for them a whole suite of MS Access (2003) apps which are all front-end to a MS SQLServer DB, i.e. all front-end apps have virtually only VBA code and more or less GUI in them, and a whole lot of linked tables, but practically no local tables.

What kind of problems could I get on the new platform, apart from things like security / trusted locations, DB format (ACCDB) and such ? Has there been any significant deprecation of / changes to / enhancements of VBA objects/methods/properties between 2003 and 2010 ?

Also, one important Access app is driwing MS Word to open template documents with  MERGEFIELD placeholders and IF's, and replaces these with data from the DB. Are there any known changes in that area which could be in the way of that kind of processing ?

Thanks for passing your knowledge in these areas. Any hint welcome !

Regards
Bernard
0
Comment
Question by:bthouin
5 Comments
 
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 50 total points
ID: 34218435
There have certainly been changes, but all are backward compatible. Anything that works in 2003 should also work in 2010.

That said, it would be prudent to setup a test environment where you can thoroughly test your application in 2010. It seems that the newer versions - 2007 and 2010 - are less forgiving of sloppy coding practices (of which we are ALL guilty).
0
 
LVL 3

Accepted Solution

by:
RCUllrich earned 100 total points
ID: 34218706
I have successfully converted a program from Access 2003 to 2010.  These are the differences that I had to address:
1. When declaring recordsets, I had to be specific. For example, "Dim rs as Recordset" did not work for my DAO commands. I had to use "Dim rs as DAO.RecordSet"
2. Access 2010 uses different images that can be embedded in command buttons. I experienced a problem when I converted my Access 2003 application to 2010. Namley, "ghost" images of my buttons appeared in other parts of the form as the buttons were enabled or disabled. This problem disappeared when I went to each command button and chose from the available images in Access 2010. Also, the new images make your forms look better. I haven't seen this  addressed yet by Microsoft but I recommend going through every form and replace the converted images embedded in command buttons with the new images available.
3. Menus are converted as an "Add-in". I converted these drop-down menus to the new Ribbon control to make the application compatible with the new style available in Office 2010.
4. I chose to use the new "tabbed" interface for displaying most forms. It makes it easier to navigate between forms. For some forms I kept them as "pop up" and sometimes "modal" to force user to address that form before working with any other form.

Other than these areas, everything worked as it did in the prior version.
Bob
0
 
LVL 31

Assisted Solution

by:Helen_Feddema
Helen_Feddema earned 100 total points
ID: 34218865
Here is a document that lists typical changes to be made when upgrading a database.  Some of the changes are for much older code than 2003, but the 2003 database may have Access 95-era code, carried over from past years (DoMenu stuff in particular). Updating-a-Database.doc
0
 
LVL 84
ID: 34218927
<When declaring recordsets, I had to be specific.>

This has to do with references. In your 2003 database, you apparently did NOT have an ADODB reference, else you would have been require to disambigulate your objects in that one as well. It's a good idea to do so regardless.

0
 
LVL 1

Author Closing Comment

by:bthouin
ID: 34479851
Thanks to all of you guys for your tips, I'll try that as ssoon as I'll get a (promised) test environment.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Preface: When I started this series, I used the term CommandBars because that is the Office Object class that it discusses. Unfortunately, when Microsoft introduced Office 2007, they replaced the standard Commandbar menus with "The Ribbon" and rem…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now