Access compatibility check 2003 - 2007

Posted on 2007-08-12
Last Modified: 2013-12-05

I'm want to starrt using my A2003 (ADP) application in a 2007 environment, but there is some code that I need to re-write for 2007.  as it is only a few lines, I want to add and if then else structure to determine the access version ?  any idea how I can do this ?
something like
If straccess_version = "2003" then
 code A2003
 code A2007
end if

Thx in advance
Question by:ITBenelux
    LVL 84

    Accepted Solution

    Application.Version will provide you the current version of Access ... for example, Access 2003 is "11.0", so you can do this:

    If Application.Version="11.0" Then
     <2003 code here>
    End If

    Although I have to ask: What code are you running in 2003 that must be different in 2007? You would be FAAAR better off not having version specific code (and almost every version of Access is backwards compatible, so code written for 2003 should work in 2007 with no modifications).
    LVL 1

    Author Comment

    That was the line, I was looking for.  To answer your question, some adp's will have to run in a mixed environment for a while, that what I needed the check for.

    LVL 84
    I see ... but what code are you running in 2003 that will NOT run in 2007? Any code that is viable on the 03 platform should work on the 07 platform, assuming you're not converting to the ACCDB format ... and even then, most code would work.
    LVL 1

    Author Comment

    It is mainly a Ribbon issue.  my custom toolbar's shows up in the add-in toolbar.  So I just skip some code in 2007

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    This article is a continuation or rather an extension from Cascading Combos ( and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
    I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
    Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
    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…

    734 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

    20 Experts available now in Live!

    Get 1:1 Help Now