By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,476 Members | 1,042 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,476 IT Pros & Developers. It's quick & easy.

How to determine Access version programatically?

P: n/a
Br
We're using an Access2000 ADP with an SQL2000 back-end. Because SQL2000
was released after Access2000 you need to be running Access2000 SP1 (2
or 3) for it to work properly.

Is there an easy way for the ADP to determine programatically wether the
correct service pack is installed (or if they are using a newer version
such as 2002/2003)?

Ta.

Br@dley
Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies

P: n/a
On Fri, 18 Mar 2005 00:43:45 GMT, "Br@d!ey" <br@d.nowhere.com> wrote:

Check this out:
CurrentProject.Properties("AccessVersion")
CurrentProject.Properties("Build")

-Tom.

We're using an Access2000 ADP with an SQL2000 back-end. Because SQL2000
was released after Access2000 you need to be running Access2000 SP1 (2
or 3) for it to work properly.

Is there an easy way for the ADP to determine programatically wether the
correct service pack is installed (or if they are using a newer version
such as 2002/2003)?

Ta.

Br@dley


Nov 13 '05 #2

P: n/a
Br
Tom van Stiphout wrote:
On Fri, 18 Mar 2005 00:43:45 GMT, "Br@d!ey" <br@d.nowhere.com> wrote:

Check this out:
CurrentProject.Properties("AccessVersion")
Returns "08.50" on an "Access 2000 (9.0.0.6620) SP3" machine?
CurrentProject.Properties("Build")
Returns "6620" which is a little more helpful. I need the full version
as users could be using Access 2000/2002/2003.

Thanks Tom

I ended up using some code from
http://www.mvps.org/access/api/api0065.htm

Since different installations can actually have slightly different
version numbers I used a range to determine which version & service pack
it is. It seems to work ok even though it's a bit "clunky".

Note: The version number displayed in Access 2000 is actually the
version of the file MSO9.DLL. My code checks the version on MSACCESS.EXE
as this is contant across all Access versions. The version on this file
however is slightly different.

eg.

Function GetAccessEXEVersion() As String
On Error Resume Next
Dim AccessVer As String, AccessVerDesc As String
AccessVer = fGetProductVersion(Application.SysCmd(acSysCmdAcce ssDir) &
"msaccess.exe")
Select Case AccessVer
Case "9.0.0.0000" To "9.0.0.2999": AccessVerDesc = "Microsoft Access
2000 (" & AccessVer & ")"
Case "9.0.0.3000" To "9.0.0.3999": AccessVerDesc = "Microsoft Access
2000 (" & AccessVer & ") SP1"
Case "9.0.0.4000" To "9.0.0.4999": AccessVerDesc = "Microsoft Access
2000 (" & AccessVer & ") SP2"
Case "9.0.0.6000" To "9.0.0.6999": AccessVerDesc = "Microsoft Access
2000 (" & AccessVer & ") SP3"
Case "10.0.2000.0" To "10.0.2999.9": AccessVerDesc = "Microsoft
Access 2002 (" & AccessVer & ")"
Case "10.0.3000.0" To "10.0.3999.9": AccessVerDesc = "Microsoft
Access 2002 (" & AccessVer & ") SP1"
Case "10.0.4000.0" To "10.0.4999.9": AccessVerDesc = "Microsoft
Access 2002 (" & AccessVer & ") SP2"
Case "11.0.0000.0" To "11.0.59999.9999": AccessVerDesc = "Microsoft
Access 2003 (" & AccessVer & ")"
Case "11.0.6000.0" To "11.0.69999.9999": AccessVerDesc = "Microsoft
Access 2003 (" & AccessVer & ") SP1"
Case Else: AccessVerDesc = ""
End Select
If SysCmd(acSysCmdRuntime) Then AccessVerDesc = AccessVerDesc & "
Run-time"
GetAccessEXEVersion = AccessVerDesc
End Function

Br@dley

-Tom.

We're using an Access2000 ADP with an SQL2000 back-end. Because
SQL2000 was released after Access2000 you need to be running
Access2000 SP1 (2 or 3) for it to work properly.

Is there an easy way for the ADP to determine programatically wether
the correct service pack is installed (or if they are using a newer
version such as 2002/2003)?

Ta.

Br@dley

Nov 13 '05 #3

P: n/a
"Br@d!ey" <br@d.nowhere.com> wrote in news:Bfs_d.2166$C7.2079@news-
server.bigpond.net.au:
Case "10.0.4000.0" To "10.0.4999.9": AccessVerDesc = "Microsoft
Access 2002 (" & AccessVer & ") SP2"
Case "11.0.0000.0" To "11.0.59999.9999": AccessVerDesc = "Microsoft
Access 2003 (" & AccessVer & ")"


Access 2002 has an SP3.

--
Lyle
--
Nov 13 '05 #4

P: n/a
Br
Lyle Fairfield wrote:
"Br@d!ey" <br@d.nowhere.com> wrote in news:Bfs_d.2166$C7.2079@news-
server.bigpond.net.au:
Case "10.0.4000.0" To "10.0.4999.9": AccessVerDesc = "Microsoft
Access 2002 (" & AccessVer & ") SP2"
Case "11.0.0000.0" To "11.0.59999.9999": AccessVerDesc =
"Microsoft Access 2003 (" & AccessVer & ")"


Access 2002 has an SP3.


Ta. None of the people we deal with use 2002 anyway:)

Br@dley
Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.