undo form additions with sub-forms 
Author Message
 undo form additions with sub-forms

Hello,

Using Office Xp (Access 2002)
The scenario, master/detail form.
Once the Master And detail (subform) have been modified
the command:
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, ,
acMenuVer70
No longer functions. The record changes are not undone,
and two new "unwanted" table entries exist.
Any suggestions?
Thanks in advance,
Andrew.



Fri, 06 Jan 2006 00:15:00 GMT  
 undo form additions with sub-forms
Hello,

Using Office Xp (Access 2002)
The scenario, master/detail form.
Once the Master And detail (subform) have been modified
the command:
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, ,
acMenuVer70
No longer functions. The record changes are not undone,
and two new "unwanted" table entries exist.
Any suggestions?
Thanks in advance,
Andrew.



Fri, 06 Jan 2006 00:14:58 GMT  
 undo form additions with sub-forms

Quote:

> Hello,

> Using Office Xp (Access 2002)
> The scenario, master/detail form.
> Once the Master And detail (subform) have been modified
> the command:
> DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, ,
> acMenuVer70
> No longer functions. The record changes are not undone,
> and two new "unwanted" table entries exist.
> Any suggestions?
> Thanks in advance,
> Andrew.

Try Me.Undo instead.

hth

Hugh



Fri, 06 Jan 2006 05:14:00 GMT  
 undo form additions with sub-forms

Quote:

> Hello,

> Using Office Xp (Access 2002)
> The scenario, master/detail form.
> Once the Master And detail (subform) have been modified
> the command:
> DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, ,
> acMenuVer70
> No longer functions. The record changes are not undone,
> and two new "unwanted" table entries exist.
> Any suggestions?
> Thanks in advance,
> Andrew.

Me.Undo will undo the unsaved child record being created in the
Subform.  However, since you have moved off the main form onto the
Subform, the main or parent record behind the main Form already exists.
Either because it was created previously and has other child records
attached, or because you have just created it from new.  This means you
have to see if it has any other child records before you try to delete
it.

A DLookup() on the child Table, using the Primary Key value of the
Parent record will tell you if you have any other Child records.  If
not, then it should be safe to delete the parent record without further
ado.  Otherwise, with Cascaded Deletes set in the Table relationship,
deleting the parent record, will also delete any children of that
parent record.

hth

Hugh



Fri, 06 Jan 2006 05:24:22 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Sync Main form and sub-form undo

2. Undo in Main-form + Sub-form

3. a solution to growing mdb's and undo'ing form with sub-form

4. a solution to growing mdb's and how to undo a form with sub-form

5. Undoing and Saving Sub forms with in a form

6. main form to sub form to another sub form

7. Linking / querying a 2nd sub form using the main form and the 1st sub form

8. Addition on the Main Form from two subforms

9. how do you allow additions in a sub form

10. Controlling Sub-form data entry,edits,additions and deletions


 
Powered by phpBB® Forum Software © phpBB Group