Add Click Event To Subform Control

  • Thread starter Thread starter Toni
  • Start date Start date
T

Toni

Please excuse my multiposting, I just learned how to simultaneously post to
more than one newsgroup.

I need to be able to click on a subform control and open a form in acDialog
mode. A subform control only has an Enter event and when I try that the code
executes again when focus returns to the form with the subform. Is their a
way to add a Click event to a subform control?

If there is, I have several subforms on the same main form where I would
need to select all the subforms and somehow add = MySubformFunction() to the
click event of all of them. How would I do that?

Thank you,

Toni
 
The subform control is about the only thing to which you cannot add a Click
event. You could add one to the subform's details section, header, footer,
or to any control on the subform. It's best to make design changes to a
subform by opening the subform separately (rather than along with the main
form). The subform control only exists, so to speak, as part of the main
form. Every part of it is actually something else such as detail section,
text box, etc. When you click the subform control you are clicking whatever
the cursor is pointing to. How could the cursor know when pointing to a text
box that you really want to click the subform control? If you could click
the subform control you would be exactly where you are with the On Enter
event.
What is MySubformFunction and why do you want to add that to the click event
of each subform? If you are opening a form from the subform, why not do so
by clicking on whatever you choose? Any control in the subform is included
in the On Enter event for the subform control, but clicking is in a different
category.
 
Back
Top