Detecting a click from inside another [event]?

D

Dennis

Can I test for an event from inside another event?

For example: I'm in an OnExit event. However, that OnExit event (from a
text-entry field) was precipitated by the clicking of a button. Chan I check,
withing the OnExit event, whether or not an OnClick event has also taken
place? If so, how?

Thanks!
 
R

Rick Brandt

Dennis said:
Can I test for an event from inside another event?

For example: I'm in an OnExit event. However, that OnExit event (from
a text-entry field) was precipitated by the clicking of a button.
Chan I check, withing the OnExit event, whether or not an OnClick
event has also taken place? If so, how?

Thanks!

Nope. Exit happens first so as far as the code in that event is concerned
the Click is in the future.
 
D

Dennis

Thanks for your reply. FYI, I recently found a workaround. Since the clicked
button is the currently ActiveControl (even though the OnExit is being
performed), inserting this code in the OnExit event will allow you to take
action based on the button-click:

Dim ctlCC As Control
Set ctlCC = Me.ActiveControl

If ctlCC.Name = "frmPRTR_submit" Then
Call frmPRTR_submit_Click
Exit Sub
End If


Now ain't THAT kewl.....
 
Top