Deleting single records in a continuous form

Sam Summers

Registered User.
Local time
Today, 20:17
Joined
Sep 17, 2001
Messages
939
Hi there,

I am trying to allow users to delete single records from a continuous form by double clicking on the appropriate record.
I can delete all the records with this delete query

DELETE SelectedItems.SelectionID, SelectedItems.EquipRef, SelectedItems.ItemNo
FROM SelectedItems
WHERE (((SelectedItems.ItemNo)<>"1"));

but only want to delete one at a time.

Any ideas?

Thanks in advance
 
you have answed the question your self.

USE A DELETE QUERY.



Code:
DELETE SelectedItems.SelectionID, SelectedItems.EquipRef, SelectedItems.ItemNo 
FROM SelectedItems 
WHERE (((SelectedItems.ItemNo)<>"1")) and selecteditems.selectionid=[forms]![SomeForm]![SelectionID];

now it will only effect the row selected.
 
Pat Hartman is right to say:
Double-click is used for many things and I think that it is dangerous to use for this purpose.

But, if you're in a continuous form, it is simple enough to click on the record selector [the vertical bar to the left of the record] and then hit the Delete key. The user is then prompted to confirm their choice.

No query, No code.

HTH
 

Users who are viewing this thread

Back
Top Bottom