Record Selectors - can it trigger a procedure

S

Stapes

Hi
I have a form which displays records in datasheet view, with the grey
Record Selectors down the side. Normally, to delete a record, you can
just click on the Record Selector, the use the delete button.
However, this for uses a query, so the data is read-only.
Is there a way I can get it to trigger a procedure if the Record
Selector is clicked, where I can write code to do the delete?

Stapes
 
D

Douglas J. Steele

Whenever you change which record is current, the form's Current event fires.

If you're trying to do a delete, the BeforeUpdate event should fire.
 
L

Larry Daugherty

To answer your questing: Not the way you want it to do. If the
underlying recordset can't be edited then it can't be deleted.

Unsolicited response: It would be a dangerous thing to have the
selector automatically delete the record in view. Rather than make
some part of the normal interface respond in a potentially unexpected
manner it would be better to put a separate control on your form.
That's true even if you are the only user of the application.

I've had the experience of opening an application I'd done years ago
and being surprised at its behavior when I opened it after years of
non-use.

In your case it sounds like you really need to go back and fix the
underlying query so that it produces an updatable recordset.

HTH
 

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