Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error With Menus

Status
Not open for further replies.

Sameal

Programmer
Aug 6, 2001
142
US
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?
 
Also having problem with a menu sub named:

Public Sub Menu_Prog()
MsgBox &quot;Testing&quot;
End Sub


When I click on Programming out of the context menu it runs this sub-routine three times in a row instead of just once. Does anyone know what would cause this behavior?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top