Detect focus on subform?

  • Thread starter Thread starter SF
  • Start date Start date
S

SF

Hi,

I have a main form with two subforms A and B. The SubForm A store the Main
Activity (name and other details) and SubForm B would list all details sub
activities below to SubForm A. These forms are working good.

Now I design a POPUP menu that can be used by the two subforms. It may
consist of New|Edit|Print etc...

My question is that how do I determine on which subform the focus is on (or
user right click on which form), so that I can open or take appropriate
action. If user right clich SubForm A then I would open frmEditMainActivity
else open another one frmEditDetailActivities.

SF
 
Examine the ActiveControl of the main form.

That will tell you wish subform controls is the active one on the main form,
or if the user is not currently in either subform.
 
Back
Top