Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What version of Access is the user running?

Access Howto:

What version of Access is the user running?

by  randysmid  Posted    (Edited  )
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.


HTH,
Randy Smith
California Teachers Association
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top