Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Test for Ctrl Key While Selecting From Combo? (a2k (9.0.6926) SP-3 Jet 4.0 SP-8)

    I have a combo box that I populate with sql to find specific records

    When the combo opens, I select my choice with the mouse or arrow down and press enter to retrive the specific record.

    Question, If I hold down the Ctrl Key while I select from the list can I test to see if the Ctrl Key was pressed while selecting the record from combo box?

    If so where and how?

    Thanks, John

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Test for Ctrl Key While Selecting From Combo? (a2k (9.0.6926) SP-3 Jet

    John,

    When you use the On Mouse Down event of the combobox, the argument Shift will return 1 if the shift-key is pressed and 2 if the CTRL-key is pressed.
    You could then test on this value.
    If you press CTRL-Enter to enter a value in the combobox, I think nothing is selected. If you press CTRL-Up or CTRL-Down, the selected item goes to the first or last item in the combo list.
    Francois

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Test for Ctrl Key While Selecting From Combo? (a2k (9.0.6926) SP-3 Jet

    Thanks

Posting Permissions

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