I am perfectly familiar with all the commands you are using, just not the way you are using them,
where is the button? on a single form? a continuous form? in the header, detail or footer section? how are you determining which record has the focus to be deleted? So what are you trying to do? and why? Perhaps you should be using undo/cancel instead of delete? perhaps the form should not allow additions? who knows if you can't tell us?
best guess is you are trying to delete the record that you are currently on - but if you are on a new record then it hasn't been created so can't be deleted - but the act of clicking the button means you leave that record and move to a new one so it is saved but is no longer the current record.
I have a delete button that effectively deletes the CURRENT record.
The button is in the header of a single form. As such there is only one record, the current record, visible. This is the one I want to delete.
I am deleting it because it is no longer required and has no historical value. It is totally redundant.
The form MUST allow additions. If not it could not grow, ie take on more information.
I am not on a new record when I click the button. I am on the last, previously saved, record that exists on the current table.
Now the guts of my question.
When I click the delete button in the header of my single form, this pre-existing last record on the table, that is the record currently displayed on my single form, that record is deleted and a new record appears.
How do I either stop this new record from being created or move away from it without it becoming part of the table that currently has focus.
In other words:
I have a table with 10 records.
I need to delete record number 10.
I make record number 10 visible on my single form and click the delete button in the header.
When I do this, record number 10 is deleted but a new record number 10 is created.
I want my table to now have a total of 9 records
Alternatively,
I have a table with 10 records.
I need to delete record number 7.
I make record number 7 the current record. Ie. visible on my single form and click the delete button in the header.
Record number 7 is deleted.
I now have 9 records in my table
I think my command of the English language is more than adequate to describe most situations. If, however, the above does not adequately describe my current predicament, I admit to being at a total loss for words!