Yes,
It is possible to determine the version of Access that is running within an Access application. This technique uses the "SysCmd" object. The code is relatively simple and doesn't require any additional VBA "references":
If SysCmd(acSysCmdAccessVer) = 7 Then
MsgBox "This is the Access 95", vbOKOnly
End If
If SysCmd(acSysCmdAccessVer) = 8 Then 'assumed to be 8
MsgBox "This is the Access 97", vbOKOnly
End If
If SysCmd(acSysCmdAccessVer) = 9 Then
MsgBox "This is the Access 2000", vbOKOnly
End If
If SysCmd(acSysCmdAccessVer) = 10 Then
MsgBox "This is the Access 2002", vbOKOnly
End If
Obviously, this could have been created with "Select case" statements.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.