473,386 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

What to delete new record started on Continuous Form

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.

Nov 13 '05 #1
3 3311
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
<vu******@isp.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
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.

Nov 13 '05 #2
the ESC key only clears the data entered, it does not delete the
record.
thanks for your suggestion
bobh.

Nov 13 '05 #3
vu******@isp.com wrote:
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.

--
This sig left intentionally blank
Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Deano | last post by:
If I create 2 or more records in my subform and I then delete the main record, then all the controls on my subform disappear. Yet if there is only one record in the subform then it gets deleted...
3
by: Mark | last post by:
Hi there, I have a subform, set as a continuous form. When a user selects a particular record in that subform, how can I make that particular record stand out (color or font change, size, etc) from...
1
by: Kevin Myers | last post by:
Hello, I have a form that contains several sub-forms corresponding to tables which are conceptually children of the main table for the form. On this form, I need to have a button that allows...
1
by: Richard Coutts | last post by:
I have a Continuous Form where each record has a button that activates another form that simplifies entering values into the record. The activated form has the equivalent of a "Done" button. I'd...
3
by: Typehigh | last post by:
I am a good programmer, but this one stumps me! I have a form with a continuous subform. The continuous subform contains records of data and may reach a depth of 1000's of entities. I have...
2
by: bobdydd | last post by:
Hi Everybody I have got a weird one here. I have a large form frmTransactions based on a single table tblTransactions. There are a lot of fields on the form but everything works OK. That is...
1
by: jodyblau | last post by:
I have a form that is in Continuous form. In each record there is a button next to the a date box. When the button is pushed, the calendar control is set to visible (rather than in a seperate pop...
5
by: Bob Bridges | last post by:
Start with two tables, parent records in one and child records in the other, a one-to-many relationship. Create a select statement joining the two. Display the query in datasheet mode. When I...
0
by: Andy_Khosravi | last post by:
I'm having issues with updates being blocked due to some sort of record locking issue. The error does not occur consistently, so I've had a hard time nailing it down. It does happen enough to cause...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.