"H. Martins" <(E-Mail Removed)> wrote in message
news:b4ab14e1-51c6-4c16-8a78-(E-Mail Removed)...
>I have a form whose default view is 'continuous form'.
>
> Then when I click a button I need to delete the record where the mouse
> is (was just) placed.
>
> How can I find out the record number?
>
> Alternatively any idea is welcome.
>
> Thanks
> Henry
Records don't have inherent record numbers, since they can be sorted in many
different ways. But you don't need a record number to delete a record. If
your button is in the form's detal section, then clicking it will make that
record the current record, and if the button is in the form's header or
footer, the form's current record will remain the same as it was before
clicking the button. Therefore, you can just tell Access to delete the
current record:
RunCommand acCmdDeleteRecord
--
Dirk Goldgar, MS Access MVP
Access tips:
www.datagnostics.com/tips.html
(please reply to the newsgroup)