Capturing all clicks on a form?

M

Maury Markowitz

I put an event handler in my Form_Click to capture the selection every time
the user moves from record to record on my Continuous Forms display. However
I notice this only captures clicks on the form itself, not fields in the
form. Is there some way to get ALL clicks?

I think I'm missing something that will be obvious in retrospect...
 
D

Dirk Goldgar

Maury Markowitz said:
I put an event handler in my Form_Click to capture the selection
every time the user moves from record to record on my Continuous
Forms display. However I notice this only captures clicks on the form
itself, not fields in the form. Is there some way to get ALL clicks?

I think I'm missing something that will be obvious in retrospect...

If you just want to know when the user moves from record to record, and
it doesn't matter how -- whether by clicking, or by tabbing, or by menu
item -- then you can use the form's Current event, which fires whenever
a new record becomes the current one.

If you specifically need to know that the user clicked the mouse
somewhere on this record, then I think you're going to have to trap the
Click event for all the controls on the form, as well as the Detail
section and the Form itself. Even then, you won't be out of the woods,
because the Click event of a combo box doesn't fire unless the user
actually makes a selection from the list, or updates the value in the
text part of the combo. You could use the MouseDown or MouseUp event, I
suppose, but again, you're going to have to trap it for all controls,
for the Detail section, and for the form itself.
 
M

Maury Markowitz

Dirk Goldgar said:
If you just want to know when the user moves from record to record, and
it doesn't matter how -- whether by clicking, or by tabbing, or by menu
item -- then you can use the form's Current event, which fires whenever
a new record becomes the current one.

I tried this, but the downside is it fires every time there's a refresh as
well, which I do all the time.
If you specifically need to know that the user clicked the mouse
somewhere on this record, then I think you're going to have to trap the

Urg, I was hoping I was just missing something.

Maury
 
D

Dirk Goldgar

Maury Markowitz said:
I tried this, but the downside is it fires every time there's a
refresh as well, which I do all the time.

Why?

I suppose you could set a module-level flag every time you refresh, and
check and reset that flag in the Current event. That would let you
distinguish between your refresh and the user's navigation.
 
Top