Print Page | Close Window

Form_SubformSaveUndo.mdb

Printed From: Roger's Access Library
Category: Other Download Libraries
Forum Name: Tejpal, A.D.
Forum Description: A.D. Tejpal's Library
URL: www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=97
Printed Date: 22 Oct 2017 at 2:39am


Topic: Form_SubformSaveUndo.mdb
Posted By: A.D. Tejpal
Subject: Form_SubformSaveUndo.mdb
Date Posted: 08 Jul 2008 at 11:03pm
This sample db demonstrates user control over Save / Undo actions on a subform. 
 
There are two command buttons (CmdSave and CmdUndo) on the subform. It is 
convenient to place these buttons on the subform itself, as the subform gets 
updated as soon as the focus shifts to the main form.
 
These command buttons are in disabled state to start with. As soon as the record 
gets edited and the form becomes dirty, both the buttons become enabled and the 
user can take appropriate action (Save or Undo). As long as the record remains 
dirty, a warning label remains displayed at top.
 
If the user tries either to move to a different record or to exit the subform while the 
record is still dirty, the action is trapped via form's BeforeUpdate event, for 
prompting the user either to save or reject the changes. If, however, the change is 
saved / rejected through direct click on the Save / Undo buttons, the prompt is 
suppressed and the desired action gets carried out straightaway.
 
Note - This solution is equally applicable to an independent form.

Download Access 2K/XP/2K3: http://www.rogersaccesslibrary.com/forum/uploads/37/Form_SubformSaveUndo.zip - uploads/37/Form_SubformSaveUndo.zip



-------------
--

Email: mailto:adtejpal@gmail.com - adtejpal@gmail.com



Print Page | Close Window