Reset whole form to defaults

  • Thread starter Thread starter Stu
  • Start date Start date
S

Stu

I have a form in which I make numerous changes to label captions, control
visibility, control rowSources, etc. Is there a method to "reset" a form to
its defaults as if it has just opened other than a) closing it and then
re-opening or b) looping through all the controls? I would like to do this
"reset" based on selected user actions, i.e., events.
 
Not without you writing it.
I would suggest you write a sub or function that sets the values to the
original values and call it when you you want to reset the values.

If you want to make it really useful and universal, write a class module
that has an Initialize event that reads and stores all the properties of all
the controls on the current form. Then use the gets and sets to manipulate
the values. Then you could call it in the Load event of any form and use it
throught the session.
 
Back
Top