I have created a Shortcut Menu (Context Menu) for one of my forms. The On Action property of the menu item 'Sales' is set to '=Menu_Sales()'.
I then placed a Public Sub in the containing Form and here is the code below for it.
Public Sub Menu_Sales()
oQuote.Display
oPart.Display
End Sub
I get the following code when trying to run the sub routine.
The expression you entered contains invalid syntax.
You may have entered a comma without a preceding value or identifier.
I'm confused by this error message because there are no commas. I set a break point to the beginning of Menu_Sales() and watched code progression but it hits the error just after the End Sub. Where could this be coming from?
Also is there any way to place all your 'Menu_<Item>' routines into a module so that every form that uses that menu will use the same sub-routines?
I then placed a Public Sub in the containing Form and here is the code below for it.
Public Sub Menu_Sales()
oQuote.Display
oPart.Display
End Sub
I get the following code when trying to run the sub routine.
The expression you entered contains invalid syntax.
You may have entered a comma without a preceding value or identifier.
I'm confused by this error message because there are no commas. I set a break point to the beginning of Menu_Sales() and watched code progression but it hits the error just after the End Sub. Where could this be coming from?
Also is there any way to place all your 'Menu_<Item>' routines into a module so that every form that uses that menu will use the same sub-routines?