This may be more complicated that I first mentioned. I will be using one custom shortcut menu for my form and on the form is a Richtext Box named "NotePad" onwhich I need to use another custom shortcut menu. The event code that I will be using to activate the shortcut menu in the Richtext Box is:
Private Sub NotePad_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Long, ByVal Y As Long)
If Button = acRightButton And Shift = vbNormal Then
'Do your right-click stuff here
Unfortunately the commands you gave me for this don't seem to work. There must be some other command that will work.
The name of my shortcut menu is "rftMenu" so that I can identify it from the other shortcut menus that I have. To elaborate; the form has a tab control onwhich there are a number of tabs. Each tab has different controls (ie. text boxes, memo fields, and richtext boxes). The database is for tracking some state regulations; so in order to maintain the crossouts, underlines, bolds and italized text I need to use rich text. The other memo fields don't need formatting, so they are left for unformatted text. For the fields using unformatted text, I use shortcut menu named "frmMenu" and likewise for my report print preview screen I use a shortcut menu named "rptMenu".
The problem developed from the properties of the richtext fields require different editing commands from the unformatted text and the richtext fields don't seem to allow for another right click popup menu like a shortcut menu. I tried using a popup "menu" form for the richtext field; however, I don't know how to connect the commands from a popup form to the form being edited. Thus I'm made an additional shortcut menu and I'm looking for a way to exicute it differently from the shortcut menu already assinged to the rest of the form. On the tab control pages I have different richtext fields; so I've made a module with Public Functions to apply to any richtext active control.
The method suggested is appreciated by all means; however, it doesn't work for my design. I need an alternate method to activate this shortcut menu, like using a macro or a "DoCmd" type of code in VB. In otherwords, is there a way to have more than one shortcut menus for the same form?