Access 2000, 2002 (XP) and 2003 forms have
a new property "Allow Design Changes" that can help during design
& test - you can view the form's property sheet at runtime, very handy.
When the Access application is ready for production, that property needs to be
turned off, otherwise users will describe all the
floating property sheets. The following code will turn off the property on all
of your forms (as always, watch for line breaks):
Sub AllowDesignChangesNo()
Dim db As DAO.Database
Dim doc As Document
Dim frm As Form
Dim iSave As Integer
Set db = CurrentDb
For Each doc In db.Containers("Forms").Documents
DoCmd.OpenForm doc.Name, acDesign
Set frm = Forms(doc.Name)
iSave = acSaveNo
With frm
If .AllowDesignChanges Then
.AllowDesignChanges = False
iSave = acSaveYes
End If
DoCmd.Close acForm, .Name, iSave
End With
Set frm = Nothing
Next doc
Set db = Nothing
End Sub