Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / June 2008

Tip: Looking for answers? Try searching our database.

Reset whole form to defaults

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stu - 30 Jun 2008 16:21 GMT
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.
Klatuu - 30 Jun 2008 16:33 GMT
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.
Signature

Dave Hargis, Microsoft Access MVP

> 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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.