473,426 Members | 4,301 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,426 software developers and data experts.

Delete Record Woes Access 2000

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
until you want to delete a record on the EOF that not much data has
been entered. Where the user has started a new record without
completing it and just got the TransactionID entered.

So now I want them to be able to delete this record:
I have tried
DoCmd.RunCommand acCmdDeleteRecord
and I've tried
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord

But no joy.

Now here is the strange bit. As I delete this record it ADDs another
one with the autonumber, and I actually see one TransactionID disappear
and a higher one appear. Twighlight Zone stuff I think.

THis not happening with another form that I experimented with or on the
table itself.

Any help would be most appreciated.

Bob

Dec 4 '05 #1
2 2473
You can execute a SQL "DELETE * FRM tblTransactions WHERE TransactionID ='"
& forms!frmTransactions !TransactionID & "'" and requery your form.
"bobdydd" <re**************@yahoo.co.uk> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
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
until you want to delete a record on the EOF that not much data has
been entered. Where the user has started a new record without
completing it and just got the TransactionID entered.

So now I want them to be able to delete this record:
I have tried
DoCmd.RunCommand acCmdDeleteRecord
and I've tried
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord

But no joy.

Now here is the strange bit. As I delete this record it ADDs another
one with the autonumber, and I actually see one TransactionID disappear
and a higher one appear. Twighlight Zone stuff I think.

THis not happening with another form that I experimented with or on the
table itself.

Any help would be most appreciated.

Bob

Dec 4 '05 #2
If the record has not been saved yet, you might try Me.Undo instead of
DeleteRecord.
This should back you out of any changes you've made to the record.
However, if you are using an autonumber field, that number will not be
re-used.

"bobdydd" <re**************@yahoo.co.uk> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
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
until you want to delete a record on the EOF that not much data has
been entered. Where the user has started a new record without
completing it and just got the TransactionID entered.

So now I want them to be able to delete this record:
I have tried
DoCmd.RunCommand acCmdDeleteRecord
and I've tried
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord

But no joy.

Now here is the strange bit. As I delete this record it ADDs another
one with the autonumber, and I actually see one TransactionID disappear
and a higher one appear. Twighlight Zone stuff I think.

THis not happening with another form that I experimented with or on the
table itself.

Any help would be most appreciated.

Bob

Dec 4 '05 #3

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

Similar topics

3
by: Niranjan | last post by:
Windows 2000 Access 2000 I have the standard Delete button code. This has been working for over 3-4 years and now it gives me an error message of 2465 everytime I delete a record. Here is...
1
by: Charles | last post by:
Hi MS Access & MS SQL Server Gurus ! I am trying to delete duplicate data from a LINKED SQL Server 2000 table (LinkedTable) and insert the result into a local (in Access) table. The following...
6
by: bobdydd | last post by:
Access 2000 Windows XP 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...
4
by: Akinyemi | last post by:
I am currently using Visual Basic 6 to write a Payroll Program. I created a Database with one Table in Microsoft Access that ships with Office 2000. The name of the Database is "Payroll", and the...
1
by: barrientos101 | last post by:
I saw the keywords in my title elsewhere, but it didn't answer my question. In Access 2000 on WIndows XP Pro, I have a multiple table join query as the basis for a form. When I delete a single...
2
by: Phil Stanton | last post by:
Deleting a record on a membership form. Does some VB checks to see if the family are still in the list. Warns me there is no going back if I delete the record, so I say OK and it appears to delete...
2
by: =?Utf-8?B?QmV0bw==?= | last post by:
I am developing a ASP.NET application, with C# code-behind classes; with SQL Server 2000. All database access is made through stored procedures. I can insert, select and update in all tables...
1
by: Bobby | last post by:
Hi I am using Access 2003 mdb as a front end to an application which uses SQL Server 2000 as the backend. The two are connected using ODBC. On one particular table (the Stock table), I have a...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.