Oct 26, 2006 #1 kpetas Programmer Joined Oct 19, 2006 Messages 11 Location ES ERROR 7777 YOU USE INCORRECTLY LISTINDEX Yesterday this code works, but today no, I don't understand For j = 0 To cad.ListCount - 1 If cad.Column(1, j) = Me.Lista3.Column(0, 1) Then cad.SetFocus cad.ListIndex = j Exit For End If Next
ERROR 7777 YOU USE INCORRECTLY LISTINDEX Yesterday this code works, but today no, I don't understand For j = 0 To cad.ListCount - 1 If cad.Column(1, j) = Me.Lista3.Column(0, 1) Then cad.SetFocus cad.ListIndex = j Exit For End If Next
Oct 26, 2006 #2 OlafBogus Programmer Joined Oct 1, 2002 Messages 77 Location GB you haven't got your listbox set to multiSelect have you? Upvote 0 Downvote
Oct 26, 2006 Thread starter #3 kpetas Programmer Joined Oct 19, 2006 Messages 11 Location ES No I didn't. And the ListBox rowsource is this: SELECT Kide.Codigokide, Kide.Nombrekide FROM Kide ORDER BY [Codigokide]; Upvote 0 Downvote
No I didn't. And the ListBox rowsource is this: SELECT Kide.Codigokide, Kide.Nombrekide FROM Kide ORDER BY [Codigokide];