Access/VBA Library

IsACCDE

Returns a Boolean value indicating if the current database is an ACCDE-database (or MDE-database).

Syntax

IsACCDE()
Return value

Boolean : True if the current database is an ACCDE- or MDE-database, otherwise False.

Code
Public Function IsACCDE() As Boolean
    Dim strMDE As String
    
    On Error Resume Next
    ' When compiled the database has a property MDE
    ' Its value should be "T"
    strMDE = CurrentDb.Properties("MDE")
    If Err.Number = 0 And strMDE = "T" Then
        IsACCDE = True
    Else
        IsACCDE = False
    End If
End Function

Validationtag:Validation