Check version of access

G

Guest

How would I check the version of access in code.

I want to be able to check the version of access and if is access 2000
ignore some code other wise run the code

ie:

if access version =2000 then exit sub
 
D

Dave Patrick

Function AccessVersion()
Dim oShell
Set oShell= CreateObject("WScript.Shell")
Select Case oShell.RegRead("HKCR\Access.Application\CurVer\")
Case "Access.Application.8"
AccessVersion = 8 '97
Case "Access.Application.9"
AccessVersion = 9 '2000
Case "Access.Application.10"
AccessVersion = 10 '2002
Case "Access.Application.11"
AccessVersion = 11 '2003
End Select
Set oShell= Nothing
End Function


--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| How would I check the version of access in code.
|
| I want to be able to check the version of access and if is access 2000
| ignore some code other wise run the code
|
| ie:
|
| if access version =2000 then exit sub
|
 
J

Joseph

This is just what I was looking for. I have from Office 2000 to Xp Pro to
Office 2007 on my network.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top