Click event for all controls

G

Guest

I have a form with a varying number of check boxes on it.

On the click event of each box I want to trigger a verification routine that
selects other checkboxes as defaults depending on the users selection.

Rather than have a procedure called seperately for each control, I want 1
event thats triggered when any of them are selected, changed or clicked on.
Any 1 of these options should do the trick. Seems that when the mouse is
clicked on a control it bypasses all the mouse events for the form.

Any ideas?
 
M

Marshall Barton

Brian W said:
I have a form with a varying number of check boxes on it.

On the click event of each box I want to trigger a verification routine that
selects other checkboxes as defaults depending on the users selection.

Rather than have a procedure called seperately for each control, I want 1
event thats triggered when any of them are selected, changed or clicked on.
Any 1 of these options should do the trick. Seems that when the mouse is
clicked on a control it bypasses all the mouse events for the form.


I think the best way is to set each control's OnClick
property to =yourverifyproc()
That can be done all in one shot by selecting all the
controls (e.g. shift click) and typing the above once.

If your peocedure needs to know which control triggered the
event, use Me.ActiveControl
 

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