| re: A97 trying to set shortcutmenu=false for all forms
The Forms Collection only contains Open Forms. If you want to do a
programmatic operation on all Forms, start with the Forms Container, or use
the AllForms Collection. I also think, for permanently changing a Property,
you may have to open the Form in Design View, set the Property, then Close
the Form.
Larry Linson
Microsoft Access MVP
"MLH" <CRCI@NorthState.net> wrote in message
news:l5ick1tq1simhjrk6rti4k54kpkf61opgp@4ax.com...[color=blue]
>I would like to change ShortcutMenu property setting
> to No for all forms - permanently. I tried this code...
>
> Private Sub Command0_Click()
> Dim frm As Form, ctl As Control
>
> For Each frm In Forms
> Debug.Print frm.Name
> With frm
> .ShortcutMenu = False
> End With
> Next frm
> End Sub
>
> Above code doesn't seem to be working. Only
> a single formname is printed in debug window
> (the current form in which this snippet resides).
> After running the code, the property is set. How
> can I save the setting permanently with all the
> forms. Apparently, code is doing this only for
> open forms.[/color] |