Results 1 to 3 of 3
  1. #1
    Join Date
    May 2006
    Location
    Alabama
    Posts
    37

    Unanswered: Call VBA Code From Right Click Menu:

    Greetings:

    Currently the following code is set to be called via a DblClick on a list box item; is it possible to perform this function by right clicking the item in the list box and selecting a command rather than DblClicking it?

    Thanks
    Mshelley




    Private Sub List0_DblClick(Cancel As Integer)
    On Error Resume Next
    'Click Sound
    PlaySound "H:\Generald\media\start.wav", ByVal 0&, SND_FILENAME Or SND_ASYNC
    'Set Value for Unit, Agency and Duty Officers
    Unit.Value = List0.Column(1)
    AGENCY.Value = List0.Column(3)
    dutyofficers.Value = List0.Column(4)
    'Set date values
    Month = Format(Now(), "mm")
    Day = Format(Now(), "dd")
    Year = Format(Now(), "yyyy")
    Dispatched.Value = TIME()

    If IsNull(Received) Then
    Received.Value = TIME()

    End If


    End Sub

  2. #2
    Join Date
    Mar 2006
    Posts
    163
    Some controls have a property called Shortcut Menu Bar.

    I believer you can use that to show a menu.

    There are detailed instructions in Help.

  3. #3
    Join Date
    Apr 2003
    Location
    Alabama, USA
    Posts
    154
    Custom Right-Click Menu

    Hope that helps!
    http://AccessDB.Info

    You live and learn. At any rate, you live. - Douglas Adams

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •