Editing a form that is not open (or opening w/o firing events?)

  • Thread starter Thread starter Andrew Backer
  • Start date Start date
A

Andrew Backer

Is there a way to edit a form while it's closed? I would like to be
able to edit the properties of some of my forms & reports w/o actually
opening them (and thus causing the sql to fire. If not that, then
maybe some way to open them silently so I can set properties, closing
them, and then opening again normally?

Thanks for any help,

Andrew Backer
gmail://awbacker
 
Andrew said:
Is there a way to edit a form while it's closed? I would like to be
able to edit the properties of some of my forms & reports w/o actually
opening them (and thus causing the sql to fire. If not that, then
maybe some way to open them silently so I can set properties, closing
them, and then opening again normally?

Thanks for any help,

To what end? You can remove the RecordSource and that will allow you to open
the form hidden, set whatever properties you want and then apply the
RecordSource.
 
Is there a way to edit a form while it's closed? I would like to be
able to edit the properties of some of my forms & reports w/o actually
opening them (and thus causing the sql to fire. If not that, then
maybe some way to open them silently so I can set properties, closing
them, and then opening again normally?

Thanks for any help,

Andrew Backer
gmail://awbacker

You can open it in Design View, Hidden.

From a code module:

Public Sub ChangeProperties()
DoCmd.OpenForm "FormName", acDesign, , , , acHidden
Forms!FormName.AllowEdits = True
Forms!FormName.AllowAdditions = False
DoCmd.Close acForm, "FormName", acSaveYes
End sub
 
Well, "to what end" is this : in ADPs there is a bug with the
ServerFilter property which means that it can't be overridden at
startup from DoCmd.OpenForm like it should be. Whatever the form is
saved with will be what is used, regardless, unless I supply openargs
and do the work manually (and have 2x the sql issued). I know I could
just make sure the form is saved with a blank serverfilter, but
eventually I will forget to reset some linked subform or other part,
and will have issues.

I would like to be able to set the property before I open the form
normally, so that everything works properly.

I am curious if this will work inside an MDE as opposed to just an MDB.
Experiment time I guess.

Thanks, I never noticed the acHidden there.

- Andrew Backer
 
Back
Top