MSFlexGrid Menu Popup in MS Access VBA (1 Viewer)

Seecott

New member
Local time
Today, 10:12
Joined
Jan 28, 2009
Messages
3
Hello,

I incorporated MSFlexGrid into my MS Access form to have the ability to color code rows/columns. I can't seem to find a wayto right-click and have the memu popup. The method PopupMenu does not seem to exist in MS Access VBA. Here is my sample code. I hope someone can provide me with an answer or some alternative options. Thanks!

Private Sub flexGrid_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Long, ByVal Y As Long)

' Button 1 = Left Click, Button 2 = Right Click
If Button = 2 Then
If flexGrid.MouseRow >= flexGrid.FixedRows And flexGrid.MouseCol >= flexGrid.FixedCols Then
flexGrid.row = flexGrid.MouseRow
PopupMenu mnuCustomers

End If
End If

End Sub
 
Hello, and welcome.

You're almost there with your custom right click handler.
You just need to refer to the specific commandbars object which relates to the shortcut menu you've created which you want to show.

CommandBars("YourCustomPopupName").ShowPopup

Cheers.
 
awesome! Thanks!
 

Users who are viewing this thread

Back
Top Bottom