Hi All,
Hopefully I ask this correctly
In Access97 I have a continuous form which is bound via a select
statement in the record source.
Lets say a user starts entering a new record on this continuous form
and gets half way through entering the record and then, oooooooops!,
they did not want to do that.
Lets say I have a button in the footer of this continuous form which
says 'Delete current record'. What would be the vba code to do that?
not wanting the users to use the toolbar buttons
I've tried
docmd.runcommand accmdUndo
docmd.runcommand.accmdDeleteRecord
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
none of these work
thanks
bobh.
Squirrel - 17 Feb 2005 09:16 GMT
Hi,
If the user is really half-way through entering the record then you can't
delete it because it
hasn't been saved yet. Could the user be trained to hit the ESC key to undo
a record?
HTH -Linda
> Hi All,
> Hopefully I ask this correctly
[quoted text clipped - 21 lines]
> thanks
> bobh.
vulcaned@isp.com - 18 Feb 2005 16:21 GMT
the ESC key only clears the data entered, it does not delete the
record.
thanks for your suggestion
bobh.
Trevor Best - 18 Feb 2005 22:22 GMT
> the ESC key only clears the data entered, it does not delete the
> record.
> thanks for your suggestion
> bobh.
Pressing it once cancels the current field, again cancels the current
record. If you've only got half way through entering a new record then
this will do what you want.
If you want to delete a record that's already there, use the button
wizard to create the code for you.

Signature
This sig left intentionally blank