Hi all-
I am having problems with my listbox selecting items when the page down or up keys are pressed. I want the user to be able to either click, or up/down arrow to select an item.
However, when the user presses down arrow, it selects the item and releases the form.
I have this code:
***List1.keypress
Lparameters nKeyCode, nShiftAltCtrl
If nKeyCode = 13
Thisform.whichpick = Thisform.list1.Value
With Thisform.oForm
.Cancel = Thisform.Cancel
.state = Thisform.whichpick
Endwith
Thisform.Release()
Endif
***list1.click()
Thisform.whichpick = Thisform.list1.Value
With Thisform.oForm
.Cancel = Thisform.Cancel
.state = Thisform.whichpick
Endwith
Thisform.Release()
Now here is what I found....
If I take out the click event, the user is able to scroll down with out selecting and press enter on their choice, but they cannot select by clicking on it.
If I put the click back in, when they hit the up/down arrow, it selects and releases the form.
Any ideas as to why this is happening?
thanks so much in advance
I am having problems with my listbox selecting items when the page down or up keys are pressed. I want the user to be able to either click, or up/down arrow to select an item.
However, when the user presses down arrow, it selects the item and releases the form.
I have this code:
***List1.keypress
Lparameters nKeyCode, nShiftAltCtrl
If nKeyCode = 13
Thisform.whichpick = Thisform.list1.Value
With Thisform.oForm
.Cancel = Thisform.Cancel
.state = Thisform.whichpick
Endwith
Thisform.Release()
Endif
***list1.click()
Thisform.whichpick = Thisform.list1.Value
With Thisform.oForm
.Cancel = Thisform.Cancel
.state = Thisform.whichpick
Endwith
Thisform.Release()
Now here is what I found....
If I take out the click event, the user is able to scroll down with out selecting and press enter on their choice, but they cannot select by clicking on it.
If I put the click back in, when they hit the up/down arrow, it selects and releases the form.
Any ideas as to why this is happening?
thanks so much in advance