CurrentProject.FileFormat Property

Access Developer Reference

Returns an AcFileFormat constant indicating the Microsoft Access version format of the specified project. Read-only.

Syntax

expression.FileFormat

expression   A variable that represents a CurrentProject object.

Remarks

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

Example

This example evaluates the current project and displays a message indicating to which version of Microsoft Access its file format corresponds.

Visual Basic for Applications
  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."