Share via

Capture event - record selector

Anonymous
2012-08-03T08:33:02+00:00

I have a main form and subform for which I need an audit log. i.e. log changes etc. All is fine on the main form, works fine, but I have a query regarding the sub form. The sub form is a continuous form with record selectors. The user can select the record by clicking on the record selector and pressing their delete key (on the keyboard) to delete that record. I'm having trouble coming up with any ideas on how I can firstly capture the event of selecting a record via the record selector (for which I then want to log the fields as they are) and secondly that they have pressed the delete key (for which I then want to log the deletion)

Any ideas?

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2012-08-03T10:26:33+00:00

When the user clicks on the record selector, the On Click event of the Form fires.

There are three events of the Form associated with deleting a record (descriptions copied from the Access help):

The BeforeDelConfirm event occurs after the user deletes to the buffer one or more records, but before Microsoft Access displays a dialog box asking the user to confirm the deletions.

The Delete event cccurs when the user performs some action, such as pressing the DEL key, to delete a record, but before the record is actually deleted.

The AfterDelConfirm event occurs after the user confirms the deletions and the records are actually deleted or when the deletions are canceled. (The Status argument tells you whether the records were deleted or not)

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2012-08-03T10:55:42+00:00

    That's exactly what I'm after, thank you :)

    Was this answer helpful?

    0 comments No comments