Ask a Question related to Microsoft Access, Design and Development.
-
Andrew #1
undo form additions with sub-forms
Hello,
Using Office XP, (Access 2002)
The scenario is a master/detail form.
Once the master has been updated And the detail (sub-form)
then the command:
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, ,
acMenuVer70
Generated by the button wizard, no longer works?
The record changes are not undone...
Any suggestions?
Thanks in advance,
Andrew
Andrew Guest
-
Text Area Additions
I was wondering if anyone else has been trying to do this? I want a Text Area that will do thesaurus and spell checking on the fly. Currently I... -
Main form and login form in different folders using Forms Authen
Having a problem on my site when the login form and the main form are in different apps. When the main app redirects to the login form app,... -
keeping track of new additions to your scene
Say I have a racetrack and different types of cars that get swapped in and out on a mousedown action. Is there a way to store ONLY the new models... -
Additions to Thumbnails Files
I have created files containing thumbnails in Photoshop, but have lost the files containing the original images. Now I would like to add some new... -
Can't use UNDO in form design mode
When I am in form design mode using Access XP, my "Edit/Undo"UNDO" function in the toolbar is grayed out. How can I enable that command? It worked... -
John Vinson #2
Re: undo form additions with sub-forms
On Sun, 20 Jul 2003 08:54:00 -0700, "Andrew" <diplodop@aol.com> wrote:
The problem is due to the way subforms have to work: typically a>Hello,
>Using Office XP, (Access 2002)
>The scenario is a master/detail form.
>Once the master has been updated And the detail (sub-form)
>then the command:
>DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, ,
>acMenuVer70
>Generated by the button wizard, no longer works?
>The record changes are not undone...
>Any suggestions?
Subform is bound to the "many" side table of a one to many
relationship. If (as should be the case) relational integrity is
enforced on this relationship, it is impossible to create a record on
the subform until the mainform record is actually saved to disk.
When you setfocus to a subform, the main form record is therefore
saved to disk. It's too late to undo it; in addition, as you move off
each subform record to a new subform record, it's also written to
disk. You can't "undo" it because it's no longer just on the form - it
has already been written out, and made available to any other user of
the database.
To "undo" it you will need to run a Delete query to delete the
mainform record; if cascade delete is set on the relationship, this
deletion will also delete the second table's records. If you don't
have cascade deletes set you will need TWO delete queries, one to
delete from the subform's recordsource, the other from the mainform.
If this isn't acceptable, you may want to consider having the Forms
bound to temporary tables rather than the "real" table; you'ld write
code to copy the updated records from temp to real at an appropriate
moment (perhaps a commmand button).
John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
[url]http://go.compuserve.com/msdevapps?loc=us&access=public[/url]
John Vinson Guest



Reply With Quote

