Currently I have been tasked with identifying the literal thousands of .mdb files our organization uses and make a determination of the .mdb version (Access97 or Access2003) and record the path, dbname, file size, date created, date LastUpdated, and version.
I have accomplished all of the above except being able to determine the .mdb version (whether it is in 97 or 2003 format). I have used the
SysCmd(acSysCmdAccessVer) in my code (code scripted in Access97 to prevent accidental opening of 97 db's in 2003). The problem is that I cannot determine which .mdb file was created by 2003.
I thought the SysCmd provided that information, but it appears not to work.
Hang on - I've just realised - doesn't acSysCmdAccessVer return the version of the application not the database? 2003 should return 11 in any case. The reason it is returning 8 is because you are running the code in A-97. Run the code in A 2k and you will get 9.
There is a property called FileFormat for CurrentProject that gives the version of the current project. I only found it be checking different properties. It is probably going to be an issue with 97 (before Projects) and then I am not sure how you you would use it opening other databases, but...