Print Page | Close Window


Printed From: Roger's Access Library
Category: Other Download Libraries
Forum Name: Tejpal, A.D.
Forum Description: A.D. Tejpal's Library
Printed Date: 14 Jul 2020 at 8:57pm
Software Version: Web Wiz Forums 12.03 -

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: - uploads/37/


Email: -

Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 -
Copyright ©2001-2019 Web Wiz Ltd. -