Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP Being obstinate
Message
De
30/10/2008 11:25:00
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
VFP Being obstinate
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01358373
Message ID:
01358373
Vues:
63
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform