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: 29 Mar 2024 at 5:04am
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


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

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net