Thanks Albert,
But that wasn't the point of my post. My question was,
how can I make my customzied functions "see" the location
of where my shortcut menu is being call just like
runcommands do?
As it is now, I have to write a different function for
each subform I use a shortcut menu on because the form
location naming has changed. I would like to just write
one function and be able to use it in a shortcut menu
anywhere without specifying:
With forms![Main]![Contact].form![MySubform1]
or
With forms![Main]![Contact].form![MySubform2]
etc... in my underlying function.
One solution I thought of was to actually set the
Shortcut Menu programatically when I enter the subform,
thereby specifying the location at that time using
something like MyShortcutFunction(frm as Form) to draw
the form name. However, I dont know how to specify the
underlying function to a shortcut menu using code
I want to function to act on any form the shortcut menu
is used on just as if I were using the Me! statement.
This is a problem as my shortcut menu doesnt seem to know
where it "is" even though it is designated as the
shortcut for the form it is on.
Does that make any sense?