Forum Discussion
AndyBentley-7653
Aug 25, 2022Copper Contributor
Deleting records from a form in datasheet view when a sort has been applied to a combo-box.
I believe that I have found a bug in Access. I am currently running Microsoft® Access® for Microsoft 365 MSO (Version 2207 Build 16.0.15427.20182) 64-bit . To reproduce this bug do the following: ...
George_Hepworth
Silver Contributor
Please upload a copy of the accdb in which you performed this operation.
AndyBentley-7653
Aug 26, 2022Copper Contributor
Unable to see how to upload into a post so I have uploaded the testdb to my OneDrive folder. Link below.
https://1drv.ms/u/s!Avi7rxURRiAr0nujcRMuFri1fw_f?e=47PqwX
The db is read only in OneDrive so please download to test.
I am deleting records from the form in datasheet view by using the record selectors to highlight and select records, then either press keyboard Delete key or use Delete button in Records section of Ribbon Home tab.
If the form Data Property 'Order By' is blank (as at present) then records are deleted just from Table2 as I would expect. However, if you apply a sort to the form by using the arrow next to the column label and then delete records they are deleted from both Table1 and Table2, even though there is no defined relationship between the two tables.
https://1drv.ms/u/s!Avi7rxURRiAr0nujcRMuFri1fw_f?e=47PqwX
The db is read only in OneDrive so please download to test.
I am deleting records from the form in datasheet view by using the record selectors to highlight and select records, then either press keyboard Delete key or use Delete button in Records section of Ribbon Home tab.
If the form Data Property 'Order By' is blank (as at present) then records are deleted just from Table2 as I would expect. However, if you apply a sort to the form by using the arrow next to the column label and then delete records they are deleted from both Table1 and Table2, even though there is no defined relationship between the two tables.
- George_HepworthAug 26, 2022Silver Contributor
I'll try it out later today, but I'm tied up for a few hours, sorry.
However, I see Arnel has joined the discussion; maybe he'll be able to respond quicker.
- AndyBentley-7653Aug 26, 2022Copper ContributorNo rush, I am now away for a long weekend. Not back till Tuesday.
Thanks.- George_HepworthAug 26, 2022Silver Contributor
THis puzzles me. I have to do more research. I can't think of an explanation that explains this. Unfortunately, time is still a bit limited today.
However, I do see that the only control on the sample form is a combo box whose row source is table1. That implies the delete is actually operating against the records in the combo box as well as the form's recordsource.