A function that returns Access version

Today we'll have a very brief post. Here is a function that encapsulates the function to check the end user's version of Access. You might want to do this for a few reasons.

  • To restrict access to a database if the end user has an incompatible version of Access.
  • To add or remove features depending on the version of Access present.
Function GetVersion() As Long
' returns application version

  GetVersion = Application.SysCmd(acSysCmdAccessVer)

End Function

To return the current version of Access in your application, just call GetVersion(). Here are the version numbers for the most recent versions:

  • Access 97 — version 8
  • Access 2000 — version 9
  • Access 2002 — version 10
  • Access 2003 — version 11
  • Access 2007 — version 12

Next post I'll have some more encapsulated Access functions you should find useful!

Related Articles:

About JP

I'm just an average guy who writes VBA code for a living. This is my personal blog. Excel and Outlook are my thing, with a sprinkle of Access and Word here and there. Follow this space to learn more about VBA. Keep Reading »

Share This Article:

Share and bookmark this articledelicious buttonfacebook buttonlinkedin buttonstumbleupon buttontwitter button
Comments on this article are closed. Why?

Site last updated: February 12, 2012