Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find out who the Caller was?

Status
Not open for further replies.

vbc22

Technical User
Dec 4, 2004
70
CA
Hi,

My question relates to finding out who the caller of the routine was.

Example:

I have 2 buttons on a form that calls the same sub routine. What would the code be to find out which button made the call?

The reason I want it to work this way is because I want to have a select statement that then processes a certain action based on which button called it.

Regards.
 
Have a look at the ActiveForm and ActiveControl properties.
You may also consider add a parameter to your called sub routine ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks for the tip PHV.

Yeah, that works. Thanks :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top