Solved

VBA changes from Access 2003 to 2010 ?

Posted on 2010-11-26
5
746 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

685 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