Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Being obstinate
Message
From
30/10/2008 11:25:00
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
VFP Being obstinate
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01358373
Message ID:
01358373
Views:
64
Hi Chaps

In the code below, verified by Debug,

This.Parent.lstSubJobs.ListIndex = say, 5

but

m.lnSubsListIndex = 0

So I get an array subscript error in the following lines.

It doesn't always happen and it's driving me mad.
I've tried just putting This.Parent.lstSubJobs.ListIndex as the array subscript but get the same error.

I've verified that .aSubJobsList is fully populated, esp. elements (in the above case) 5
Both the listbox and the formset's array have the same no. of elements, in the same order. The listbox (and others on other pages/forms within the formset) are fed from this central array.

Please no lectures about using formsets - I'm running with what already exists here.

Any ideas what could be amiss?

'ppreciate it

Terry
LOCAL	lnSubsListIndex

m.lnSubsListIndex	= This.Parent.lstSubJobs.ListIndex
With ThisFormSet
  If .aSubJobsList[ m.lnSubsListIndex, 3] = 0	
  	  this.ReadOnly	= .T.
  Else
  	  this.ReadOnly	= .F.  
  EndIf 
EndWith 
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Next
Reply
Map
View

Click here to load this message in the networking platform