CodeProject.FileFormat (Access)

Returns an AcFileFormat constant indicating the Microsoft Access version format of the specified project. Possible return values are acFileFormatAccess2 - Microsoft Access 2.0 format, acFileFormatAccess2000 - Microsoft Access 2000 format, acFileFormatAccess2002 - Microsoft Access 2002 format, acFileFormatAccess2007, acFileFormatAccess95 - Microsoft Access 95 format, acFileFormatAccess97 - Microsoft Access 97 format.

Use the ConvertAccessProject method to convert an Access project from one version to another.


Dim strFormat As String 
 
Select Case CurrentProject.FileFormat 
 Case acFileFormatAccess2 
 strFormat = "Microsoft Access 2" 
 Case acFileFormatAccess95 
 strFormat = "Microsoft Access 95" 
 Case acFileFormatAccess97 
 strFormat = "Microsoft Access 97" 
 Case acFileFormatAccess2000 
 strFormat = "Microsoft Access 2000" 
 Case acFileFormatAccess2002 
 strFormat = "Access 2002 - 2003" 
 Case acFileFormatAccess12 
 strFormat = "Microsoft Access 2007" 
End Select 
 
MsgBox "This is a " & strFormat & " project."