J
Jack Peyton
I use Access 2000. I have a DB that has 56 forms. I change the Pop up,
Modal, and Allow Design Change properties for 19 of the forms when I work on
the DB. I use a command button and the following code to open the forms and
change the properties. Is there a better or shorter way to do this?
Any help will be appreciated.
Jack Peyton
Dim A As Variant, B As Variant
If Me.Command11.Caption = "Set Forms to Pop Up and Modal" Then
Me.Command11.Caption = "Set Forms to No Pop Up and Modal"
A = True
B = False
ElseIf Me.Command11.Caption = "Set Forms to No Pop Up and Modal" Then
Me.Command11.Caption = "Set Forms to Pop Up and Modal"
A = False
B = True
End If
‘Sample of the code to open each form and change the properties. This is
repeated for each of the 19 forms.
DoCmd.OpenForm "FMisc", acDesign
Forms!FMisc.PopUp = A
Forms!FMisc.Modal = A
Forms!FMisc.AllowDesignChanges = B
DoCmd.Close acForm, "FMisc"
Modal, and Allow Design Change properties for 19 of the forms when I work on
the DB. I use a command button and the following code to open the forms and
change the properties. Is there a better or shorter way to do this?
Any help will be appreciated.
Jack Peyton
Dim A As Variant, B As Variant
If Me.Command11.Caption = "Set Forms to Pop Up and Modal" Then
Me.Command11.Caption = "Set Forms to No Pop Up and Modal"
A = True
B = False
ElseIf Me.Command11.Caption = "Set Forms to No Pop Up and Modal" Then
Me.Command11.Caption = "Set Forms to Pop Up and Modal"
A = False
B = True
End If
‘Sample of the code to open each form and change the properties. This is
repeated for each of the 19 forms.
DoCmd.OpenForm "FMisc", acDesign
Forms!FMisc.PopUp = A
Forms!FMisc.Modal = A
Forms!FMisc.AllowDesignChanges = B
DoCmd.Close acForm, "FMisc"