>>Ok... I'm stumped ( and more than a little frustrated !! )
>>
>>This code:
>>
>>
>> SELECT * FROM SRCFILES WHERE JOBNO = cJobNo INTO CURSOR MySrcFiles
>> nTotSrcFiles = _TALLY
>>
>> SELECT SRCFILES
>> SCAN
>> .
>> .
>> .
>> ENDSCAN
>>
>>
>>dies at the
SCAN command with error #1734: Property CJOBNO is not found...
>>
>>Two questions:
>>
>>Why does it think that cJobNo is a property since this
variable is used in the previous command successfully?
>>Why is it looking for cJobNo at all in the beginning of a SCAN loop?
>>
>>The form in question uses the default data environment and the file SRCFILES has no filter set or anything. The form has no property named cJobNo either...
>>
>>Any help is greatly appreciated
>>
>>TIA
>
>You got couple implicit things together. When you run this kind of Select, VFP can on its own discretion to apply filter (instead of moving record to physical table). So you really got the filter and later 'cJobNo' got out of scope (when snippet is over) and you get error message.
>So, ther are two ways to fix it:
>1) If you really need in physical table then you may use
>SELECT .... INTO CURSOR MySrcFiles NOFILTER
>It may run visibly slower then initial SELECT, so there is the second way (if again you really don't need in physical presence of data)
>2) Use literal value within SELECT, i.e.
>cWherestring="JOBNO ='"cJobNo+"' "
>SELECT .... Where &cWherestring. INTO ...
>Here you provide that filter expression will not go out of scope.
Hmmm, gave that a try too, same problem.
Please see my reply to Bruce Campbell regarding the property name of a previously opened (then closed) form. This is a mystery to me!
Thanks