G
Guest
Can someone please explain why the following code causes a "Run-time error
'7777': You have used the listindex property incorrectly" error on the
second last line of the code.
The two combo boxes are identicle and I am using the same stored procedure
as the rowsource. Setting the listIndex for the first combo box works fine
but not the second combo box. It doesn't make sense to me.
----------------------------------------------------------------------------------------
Option Compare Database
Private Sub Form_Load()
Me.Combo1.RowSource = "EXEC spGetSourceSupplierList"
Me.Combo1.SetFocus
Me.Combo1.ListIndex = 0
End Sub
Public Sub Combo1_AfterUpdate()
Me.Combo2.RowSource = "EXEC spGetSourceSupplierList"
Me.Combo2.SetFocus
Me.Combo2.ListIndex = 0
End Su
'7777': You have used the listindex property incorrectly" error on the
second last line of the code.
The two combo boxes are identicle and I am using the same stored procedure
as the rowsource. Setting the listIndex for the first combo box works fine
but not the second combo box. It doesn't make sense to me.
----------------------------------------------------------------------------------------
Option Compare Database
Private Sub Form_Load()
Me.Combo1.RowSource = "EXEC spGetSourceSupplierList"
Me.Combo1.SetFocus
Me.Combo1.ListIndex = 0
End Sub
Public Sub Combo1_AfterUpdate()
Me.Combo2.RowSource = "EXEC spGetSourceSupplierList"
Me.Combo2.SetFocus
Me.Combo2.ListIndex = 0
End Su