• For each OrderNo I want to create a Text File into my C: Drive Folder, so the file name will look something like this "C:\A1000.txt" with each text file having the result for each of the OrderNo's it loops through.

    OK. Now please state your question.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.