Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invalid Subscript error message
Message
 
To
09/03/2004 12:32:34
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00884482
Message ID:
00884556
Views:
8
Just a few observations.
In your code if for some reason
thisform.InventoryList.Listitem(i)<>m.newName always true, when do you wish to stop?

AFAIK, ..Listitem() does not respect .ListCount. You may continue to search outside the .ListCount limit. And if you reach 65001, then
..Listitem(65001) will generate the error.


>I continue to get teh Invalid Subscript error. Here's the code. Anything wrong with this code?
>
>*************
>
>SELE v_man_inv
>M.NEWNAME = ALLT(ThisForm.NsnTxt.VALUE)
>
>=TABLEUPDATE(.T.)
>
>*thisform.InventoryList.Requery
>*i = 1
>
>*DO WHILE thisform.InventoryList.Listitem(i)<>m.newName
> * i = i + 1
>*enddo
>*thisform.InventoryList.listindex = i
>*thisform.InventoryList.TopItemID = i
>*thisform.InventoryList.SetFocus
>*thisform.Disable_Boxes
>
>*Thisform.LockScreen = .f.
>
>*thisform.refresh
>*************************
Previous
Reply
Map
View

Click here to load this message in the networking platform