Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MouseUp on a ListBox

Status
Not open for further replies.

LonnieJohnson

Programmer
Apr 16, 2001
2,628
US
I am using the MouseUp event on a list box to perform a procedure on the items. All is working fine except if I check another list box on the form and go back to the listbox in question the value of the item I click is not registering. I get a message that the value of the check box is null. I read something about the MouseUp and MouseDown retain the value of the last control that had the focus. I'm not sure I know what's going on with that. Anyone have any insight?

ProDev, MS Access Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
I am not able to reproduce your problem. I did the following test on the mouse up event of list box 2 with no problems:

Code:
Private Sub lstBox2_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    MsgBox lstBox1 & "  " & cbx1 & "  " & cbx2
End Sub
 
It seems to happen if you click on another control especially another list box and then come back to the listbox that has the mouse up code.

ProDev, MS Access Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
It seems to happen if you click on another control especially another list box and then come back to the listbox that has the mouse up code.

That's what I did. I am not able to reproduce your problem. I tested in Access 2002.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top