Sub-Form Delete Record

J

Joe Cletcher

I have a sub-form (datasheet view) with primary key that is not visible. The
record source for this subform is not updatable and records cannot be deleted
by selecting a record and using the "delete" key. I can delete the record
programmatically if I could figure out how to call the macro/subroutine
because I know the primary key of the record that has the focus (i.e.
me.MstPartEventID.value).

I have tried subroutine(s) for the "On Delete", "Before Del Confirm", "After
Del Confirm", and "On Key Press" events. However, none of these events seem
to fire.

I use the "double_click" and "single_click" events to open another form or
go to a hyperlink.

How can I implement a delete record action?
 
J

John Spencer

If you are using the click event and the double-click event, you might be
able to use the mousedown or mouseup events and test for whether or not the
left or right button was pressed. OR you could add a delete button to the
subform and use its click event.
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top