Jerry C said:
Is the current MS Access version somewhere in the
register?
How can I determine the MS Access (MSAccess.exe) version
with code?
This will work for any MDB. strDB is the full path to the database. It will
crash the database it is running in if the path is incorrectly entered, so
be careful.
Function GetAccessVer(strDB As String)
On Error GoTo Err_handler
Dim ws As DAO.Workspace
Dim db As DAO.Database
Set ws = CreateWorkspace("TempWorkSpace", "Admin", "", dbUseJet)
Set db = ws.OpenDatabase(strDB)
Debug.Print strDB, db.Properties("AccessVersion")
Exit_Here:
db.Close
Set db = Nothing
ws.Close
Set ws = Nothing
DoEvents
Exit Function
Err_handler:
Resume Exit_Here
End Function
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access