Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / February 2005

Tip: Looking for answers? Try searching our database.

What to delete new record started on Continuous Form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vulcaned@isp.com - 16 Feb 2005 21:41 GMT
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

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.