Jump to content


Photo
- - - - -

List Box


2 replies to this topic

#1 gdmjdkc

gdmjdkc

    Member

  • Members
  • PipPip
  • 38 posts

Posted 29 September 2005 - 07:21 PM

I am using a list box to select specific records. I currently have the logic in the Lost Focus property of the control. When the user double clicks the record the list box behaves as expected. The key is returned and the logic is executed correctly. I have had the logic in the custom validation property of the list box with the same results as described below.

The problem is when the user clicks once on a record in the list box and then clicks once on a different record, they do not have to click fast as in a double click for selection. Everything looks normal at this point but the list box for some reason has returned a value to the key. When another control on the screen is pressed, say a button, the code on the lost focus of the list box gets executed just as it would if you double clicked the list box. The value of the key is used to go the next screen.

Does anyone know how to keep the selection box from returning a value if the user does not actually do a double click. I am testing for the value of the key in the lost focus property so that the code will only be called it the data is valid.

#2 MarkIV

MarkIV

    Member

  • Members
  • PipPip
  • 10 posts

Posted 29 September 2005 - 07:38 PM

To interrogate for a double click event we use:

IF @FNKEY = 0 THEN
CODE GOES HERE
ENDIF

#3 gdmjdkc

gdmjdkc

    Member

  • Members
  • PipPip
  • 38 posts

Posted 29 September 2005 - 07:55 PM

That was fast. Thanks for the response. I tried it out just now and the results are looking good.

Thank You.
Gayle

Edited by gdmjdkc, 29 September 2005 - 07:55 PM.




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users