Ria,
Here's a nice article on using waitforsingleobject and createprocess within VFP which should accomplish the things you want to do:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q191584>Hi,
>I am writing to know whether FoxPro can multitask.
>
>I have a FoxPro program that downloads data from a the server to a text file. Then it proceeds to fetch the data for the next table to a next file and so on.
>
>After I have all the data in the text files, the program appends data from each text file to different tables.
>
>What I want to do is this:
>- Fetch data to TextFile1
>- Upon completion, begin fetching data to TextFile2 and simultaneoulsy begin appending data to Table1 from Textfile1
>- Upon completion, begin fetching data to TextFile3 and simultaneoulsy begin appending data to Table2 from Textfile2
>and so on....
>
>Could someone tell me how this could possibly be done.
>Thanks in advance.
>
>Ria