Detect focus on subform?

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
 
A

Allen Browne

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top