MS Access: when was my form changed? Is ServerFilter set?

What forms have I changed recently?

Sub CheckForms()
    'checks forms in db


    Dim s As String
    Dim d0 As Date
    
    d0 = DateAdd("d", -7, Date)
    
    Dim ao As AccessObject
    
    s = "Forms modified in past 7 days:" & vbCrLf

    For Each ao In Application.CurrentProject.AllForms
        If (ao.DateModified > d0) Then
            s = s & ao.Name & " modified " & ao.DateModified & vbCrLf
        End If
    Next
    MsgBox s
End Sub
    

What forms have ServerFilter set? You can accidentally leave this set to a value if you make a small change to the design of the form. Write a sub to check your forms before you publish.

For Each ao In Application.CurrentProject.AllForms
        fn = ao.Name

        DoCmd.openForm fn, acDesign
        Set f = Forms(fn)
        filt = "" & f.Properties("ServerFilter")
        If Len(filt) > 0 Then
            s = s & fn & " Server Filter " & filt & vbCrLf
        End If
        DoCmd.Close acForm, fn

    Next
Website by Daneswood