Me.undo in subform

A

Anne

Please help. My form is leaving unwanted trails.

In my parent form I use Me.Undo to "abandon" a record
creation, given response to MsgBox response, upon closing
the form via a command button. All is right with my world.

However, when I wish to "abandon" a record of a subform
given response to MsgBox response upon closing the PARENT
form, I cannot get the code to work. I've tried
combinations of ".", "!", full subform address, etc, and
no joy.

Can someone shed some light on the correct code to "undo"
given a test on the subform? Where should the code go?
Remember I use a command button to close and use "on
click" and would like to just add the code there.

Hopefully, thanks for the help.
Anne
 
E

Eric J. Williams

Anne,

If I understand your problem correctly the reason you are unable to Undo the
cahnges to the "parent" record in the main for because as soon as you enter
the subform prior to causing a child resord to be inserted the parent record
must be committed. Once the record is commited to the table it cannot be
undone, it will have to be deleted.

I hope this helps.

Eric

| Please help. My form is leaving unwanted trails.
|
| In my parent form I use Me.Undo to "abandon" a record
| creation, given response to MsgBox response, upon closing
| the form via a command button. All is right with my world.
|
| However, when I wish to "abandon" a record of a subform
| given response to MsgBox response upon closing the PARENT
| form, I cannot get the code to work. I've tried
| combinations of ".", "!", full subform address, etc, and
| no joy.
|
| Can someone shed some light on the correct code to "undo"
| given a test on the subform? Where should the code go?
| Remember I use a command button to close and use "on
| click" and would like to just add the code there.
|
| Hopefully, thanks for the help.
| Anne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top