The following example uses the IsItMDE function to check the MDE property for the current database:
Dim dbs As Object
Set dbs = CurrentDb
If IsItMDE(dbs) <> True Then
' Process custom database code.
End If
Function IsItMDE(dbs as Object) As Boolean
Dim strMDE As String
On Error Resume Next
strMDE = dbs.Properties("MDE")
If Err = 0 AND strMDE = "T" Then
' This is an MDE database.
IsItMDE = True
Else
IsITMDE = False
End if
End Function