Hi All
WinXPPro
Access 2002 SP3
I have a Mainform with a Subform. I have built my own delete routine using a custom delete button on my main form and placed Cancel = vbCancel in the subform's Form-Delete event. However, for consistency of use, I'd like to call my own delete routine from the normal keyboard Delete key.
The problem I have is that my subform records are built from an 'aggregate' query... i.e.
SELECT Tgt_Tbl.* FROM System_Settings_History_Notes AS Tgt_Tbl ,(SELECT max(Version) as Max_Version,ID FROM System_Settings_History_Notes GROUP BY ID) AS Max_Results WHERE Tgt_Tbl.ID=Max_Results.ID AND Tgt_Tbl.Version=Max_Results.Max_Version AND Deleted <> Yes AND Tgt_TBL.Record_Table_Name = 'Cost_Types' ORDER BY Tgt_Tbl.List_Order ASC
From research, I believe, this effectively 'disables' the Delete key as, when pressed, I get the:
"Records Not Deleted. Data is Read-Only" prompt (allowdeletions and permissions factors check out OK).
I thought I would be able to trap an event before Access produces the Read-Only prompt and then action my own delete routine but neither the Form-Delete or Form-Keydown events seem to fire??
Does anyone know how I might be able to get around the Read-Only prompt and to action my delete please?
Thanks once again....
WinXPPro
Access 2002 SP3
I have a Mainform with a Subform. I have built my own delete routine using a custom delete button on my main form and placed Cancel = vbCancel in the subform's Form-Delete event. However, for consistency of use, I'd like to call my own delete routine from the normal keyboard Delete key.
The problem I have is that my subform records are built from an 'aggregate' query... i.e.
SELECT Tgt_Tbl.* FROM System_Settings_History_Notes AS Tgt_Tbl ,(SELECT max(Version) as Max_Version,ID FROM System_Settings_History_Notes GROUP BY ID) AS Max_Results WHERE Tgt_Tbl.ID=Max_Results.ID AND Tgt_Tbl.Version=Max_Results.Max_Version AND Deleted <> Yes AND Tgt_TBL.Record_Table_Name = 'Cost_Types' ORDER BY Tgt_Tbl.List_Order ASC
From research, I believe, this effectively 'disables' the Delete key as, when pressed, I get the:
"Records Not Deleted. Data is Read-Only" prompt (allowdeletions and permissions factors check out OK).
I thought I would be able to trap an event before Access produces the Read-Only prompt and then action my own delete routine but neither the Form-Delete or Form-Keydown events seem to fire??
Does anyone know how I might be able to get around the Read-Only prompt and to action my delete please?
Thanks once again....