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.