B
Bill Mitchell
I use many shortcut menus on my forms and subforms.
These shortcut menus are based upon macros which in turn
call various functions I have written, OR, they just call
DoCmd.RunCommand routines, like "DoCmd.RunCommand
acCmdSortAscending" for instance.
I've noticed that when I call a Function, the function
must refer to the specific form I am working on to work;
however, the DoCmd.RunCommand routines seem to work
wherever they are called (forms and subforms) even though
I have not specified any locations.
It would be VERY helpful if I could get the underlying
functions to my shortcut menus to work the same way as
DoCmd.RunCommand routines do. My question is, HOW DO THE
DoCmd.RunCommand ROUTINES ALWAYS WORK WHEREVER THEY ARE
CALLED? How does Access know where I am when calling it?
An example of the problem I am facing is my ContactPhone
Form. It is a simple continuous list of phone numbers
and addresses.
I use this on one occasion as a subform for my main
Contact form linked on ContactID. However, I also use it
as a subform on my Interviews form linked on Interview
ClientID and ContactID.
The problem I am facing is that I want to have one
shortcut menu on my form ContactPhone and use it in both
subform situations; however, since my functions must
specify location, I am forced into writing two separate
functions and having two menus to do what I need.
These shortcut menus are based upon macros which in turn
call various functions I have written, OR, they just call
DoCmd.RunCommand routines, like "DoCmd.RunCommand
acCmdSortAscending" for instance.
I've noticed that when I call a Function, the function
must refer to the specific form I am working on to work;
however, the DoCmd.RunCommand routines seem to work
wherever they are called (forms and subforms) even though
I have not specified any locations.
It would be VERY helpful if I could get the underlying
functions to my shortcut menus to work the same way as
DoCmd.RunCommand routines do. My question is, HOW DO THE
DoCmd.RunCommand ROUTINES ALWAYS WORK WHEREVER THEY ARE
CALLED? How does Access know where I am when calling it?
An example of the problem I am facing is my ContactPhone
Form. It is a simple continuous list of phone numbers
and addresses.
I use this on one occasion as a subform for my main
Contact form linked on ContactID. However, I also use it
as a subform on my Interviews form linked on Interview
ClientID and ContactID.
The problem I am facing is that I want to have one
shortcut menu on my form ContactPhone and use it in both
subform situations; however, since my functions must
specify location, I am forced into writing two separate
functions and having two menus to do what I need.