FileFormat Property

Microsoft Access Visual Basic

Show All

FileFormat Property

       

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

AcFileFormat can be one of these AcFileFormat constants.
acFileFormatAccess2
acFileFormatAccess2000
acFileFormatAccess2002
acFileFormatAccess95
acFileFormatAccess97

expression.FileFormat

expression   Required. An expression that returns one of the objects in the Applies To list.

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.

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"
End Select

MsgBox "This is a " & strFormat & " project."