rickyoswald
Programmer
I have a ListView control that is being populated via a loop from a database. The loop is quite straightforward:
.MoveFirst
i = 1
Do While i < .RecordCount
frmMain.lstMainContacts.ListItems(i).SubItems(4) = !_[Phone]
.MoveNext
i = i + 1
Loop
This works okay except the first record shows up blank in the list! I thought this may be because arrays tend to start on 0 and my variable is starting on 1, however when I change it to 0 I get the error "Index out of bounds". I have looked on google and here for answers but cannot find anything specific to this problem.
.MoveFirst
i = 1
Do While i < .RecordCount
frmMain.lstMainContacts.ListItems(i).SubItems(4) = !_[Phone]
.MoveNext
i = i + 1
Loop
This works okay except the first record shows up blank in the list! I thought this may be because arrays tend to start on 0 and my variable is starting on 1, however when I change it to 0 I get the error "Index out of bounds". I have looked on google and here for answers but cannot find anything specific to this problem.