Run from a Sub-Form

A

Andy Bleese

How do i run a macro from a sub form ?
When i try to run one i get the error message that the sub-form cannot be
found, even though its live on my screen.

Please help
 
S

Steve Schapel

Andy,

A subform is a subform, and needs to be referred to as such. My guess
is that the it is "live on your screen" as a subform, but in your macro
you have referred to it as a form. You didn't give any relevant
details, so I can't give a precise answer. But the way to refer to a
control on a subform is like this...
[Forms]![NameOfMainForm]![NameOfSubform]![NameOfControl]
.... or, as some would have it...
[Forms]![NameOfMainForm]![NameOfSubform].[Form]![NameOfControl]
 

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