>>>>>>>I did it in 5.0 because it was going to be a seperate program. Then I found out I had to integrate it into the 2.5 app. I don't know how to translate the code into 2.5 so I tried calling it externally. I guess I'll post the code and see if anyone can translate it.
>>>>>>>
>>>>>>>Thanks,
>>>>>>>
>>>>>>Hi Michelle,
>>>>>>
>>>>>>Which version of 2.5 is this FPW or FPD. In FPW you could use the API to run the other program.
>>>>>
>>>>>FPD. But I don't need to do that anymore since I can just run the code now.
>>>>>
>>>>>Thanks,
>>>>>
>>>>>Michelle
>>>>
>>>>What errors were you getting? You should be able to do what you want, but my guess is the problem is the 2 programs are trying to share the FOXUSER.DBF and that won't work.
>>>
>>>Something about not being able to access characters beyond the string and an invalid operation.
>>>
>>>Thanks,
>>>
>>>Michelle
>>
>>In VFP5, if you try to access a SUBSTR of a character value beyond it's limits, you get that error. Just set TALK OFF, and it will go away. This doesn't seem to happen in VFP6.
>>
>>VFP5/TALK ON
>>x = "ABC"
>>? SUBSTR(x,5,2) && Error
>>
>>VFP5/TALK OFF
>>? SUBSTR(x,5,2) && No error
>
>The weird thing was, though, that the same program produced no errors when I just double clicked on the exe.
>
>Thanks,
>
>Michelle
It may just be a case of which CONFIG file the .EXE was using. You may have a TALK=OFF in the one used when the .EXE is double-clicked, and when you RUN the .EXE, it's not finding a CONFIG file or it's using a differnet one, so it assumes TALK is ON, hence the error. Put a SET TALK OFF in the VFP5 code and the problem should go away.