Can’t delete last record in database

I have a database that displays the records as a list. When I select the last record in the database and select “Delete Record”, the record above the one selected is deleted, but not the last record that I wanted to delete. However, delete record works as advertised if the record selected for deletion is not the last record. What is going on? This problem was disclosed before in OCT 2017, but nobody replied.

Ok, I posted to the previous version of this question when I wasn’t sure if you meant “last” as in “bottom” or “last” as in “only”. I see it’s the former. Sounds like it is the former, apparently the same as @panaca in 2017. I have not heard of this other than these two time, and cannot duplicate the problem. If there are any other clues you can provide it would be appreciated.

Hmm, a thought – do you perhaps have both the data sheet and a view-as-list form open? There are problems with the arrow keys when this is the case, perhaps there is a problem with deleting records also.

Well, it’s the last record that I try to delete, which is always at the bottom of the list of records, since my new records will always go to the end of the list… It remains I undeleted when I use the “deleterecord” command, but the record next above it is deleted instead. However, when I try to delete a record higher on the list, no problem.
I usually have a form open at the same time as the Data Sheet, which form also shows the records in a list the same as in the Data Sheet, but with Text Displays and Push Buttons in the space above the Report Tile which hold the list. But the same problem occurs there.

A possible fix is for me to create an empty record at the bottom of the list, and create all new records above it.

Just a suggestion.

Press Command Shift 5. From there, I believe you will be able to Record the Entire Screen, Record a Window, etc.

Oftentimes I have been able to resolve an issue like this much quicker when others can ’see’ what it is that I am seeing. Sometimes there are other things on the screen that are significant that we do not recognize as significant.

As I suspected, this is the problem. I created a database with a View-As-List form, and when both that form and the data sheet are open, I sort of got the symptom you described. Actually, it did correctly delete the last record, but this was not displayed correctly in the View-As-List form. Closing and re-opening the form window shows that the last record was actually deleted, not the second to the last.

As I mentioned, there are a number of problems that occur when you have both the data sheet and a view-as-list form open at the same time. I recommend only having one of these open at once. If you are using a View-As-List form, you should close the data sheet, or vice versa.

For those of you that may not be familiar with View-As-List forms, here is the help page.

For new databases, I really recommend avoiding this type of form, and instead using a regular form with a matrix or text list object whenever possible.

I created a new database with one field, no forms, no procedures. I added several records, then selected two of them, all on the data sheet. Then I pressed the delete icon (X). One record was deleted and one record was visible. I pressed delete icon again, but the only record showing would not delete.
However, when I selected instead the same two records and chose “Delete Selected Records”, both records were deleted and all the remaining records were then selected. When I used a procedure with just the statement Deleterecord, it would also not delete the only visible record.
I never thought this was a bug, just the way things worked, so I never reported it. I thought this is what Rabe was describing.
To delete the record, you can find (rather than select) the unwanted record and then use Deleterecord provided there are more than one record visible.

Your analysis is right on. I closed the Data Sheet window and proceded only with my view-as-a-list form. I entered a dozen records, and when I selected the last record, the “deleterecord” command deleted the last record, as advertised. Thanks for your help in resolving this problem.

I think that the documentation should reflect that View-As-List forms are now almost exclusively used for printing. They can display data in forms that other views cannot, but they have limitations when viewed on screens: They cannot be used for data entry, and they do not necessarily appear on the screen as they would appear when printed.