Fabio,
Thanks for your reply and also for showing me a new construct that I wasn't aware of, BLANK FIELDS. This is handy.
After working out the problem I explained below I found that it was actually caused by another source: Because of the nature of this app I rely heavily on SCATTER MEMVAR and GATHER MEMVAR. A couple of the table memvars happened to have the same name as forms that I'm using. It was the form names that were returning .NULL. when they were out of scope. So I've learned to be more careful about possible conflicts in memory variables, and that was the problem all along.
Thanks again,
Allen
>>To All,
>>
>>I created an app that uses some free tables created from Outlook export and other free tables I created myself. Outlook accepts null values and I have never used them or wanted to use them in FoxPro. I'm real, real sure I've cleaned all the nulls out of the VFP tables created originally from Outlook with a "cleaner" program and verifyed by browsing the "cleaned" tables after. There are no nulls to be seen. The "cleaner" program opens the file, scans records and looks at each field. Here's the logic,
>>
>>scan
>> for i=1 to fcount()
>> if isnull(evaluate(field(i)))
>> n=n+1
>> this.parent.count.value=n
>> this.parent.count.refresh
>> do case
>> case type(field(i))='C'
>> replace (field(i)) with ''
>> case type(field(i))='M'
>> replace (field(i)) with ''
>> case type(field(i))='N'
>> replace (field(i)) with 0
>> case type(field(i))='D'
>> replace (field(i)) with ctod(' / / ')
>> endcase
>> endif
>> endfor
>>endscan
>>
>>But, null errors occasionally pop up during my app programs and I can't figure out why. The error is
cannot accept null values. So, nulls are somehow creeping in from somewhere.
>>
>>Any suggestions?
>>
>>Thanks, Allen
>
>
>>scan
> for i=1 to fcount()
> if isnull(evaluate(field(i)))
> n=m.n+1
> BLANK FIELDS (field(m.i))
> endif
> this.parent.count.value=m.n
>* this.parent.count.refresh
> endfor
>endscan
>