Current control

  • Thread starter Thread starter Stephen @ ZennHAUS
  • Start date Start date
S

Stephen @ ZennHAUS

Hi guys and gals

Is there an easy way to refer to the current control? For example when I
click on the drop arrow of a combo box, I want it to requery so that if the
source table the updates are reflected in the list. So, I figure that using
the OnClick event would be most appropriate and I was hoping for a simple
piece of code like Me.Requery to solve the problem. I know I can refer to
the actual control, but I want to be able to use the same piece of code for
each control that needs it rather than having to retype a new line with a
different control name.

Thanks

Stephen @ ZennHAUS
 
Hi Stephen

Me.ActiveControl should do it.

However, if you are in the Click event procedure for a given control
(SomeControl_Click), you already *know* what the active control is - it's
SomeControl.
 
Back
Top