My job initially empty's out my access table, next it executes a job to download data from our mainframe to a text file. Then it imports the text file into my access table, runs a query and exports an excel spreadsheet. <br><br>My problem is the job clears the table and executes my download job, while this is happening my job continues on and imports my text file, since it exist, from the last time the job ran, then runs the query and exports the excel spreadsheet.<br><br>I do not want the job to continue until my download is complete and my new text file is created.<br><br><b>Here is my code:</b><br><br>Dim JobPath As String<br>Dim Retval As Variant<br><br>DoCmd.OpenTable "Career", acNormal, acEdit<br> <br> DoCmd.RunCommand acCmdSelectAllRecords<br> DoCmd.RunCommand acCmdDeleteRecord<br> <br> <br>JobPath = "D:\das\daszcomm.exe d:\das\work\career.as /q"<br>Retval = Shell(JobPath)<br> <br>DoCmd.TransferText acImportDelim, "", "career", "d:\das\work\career.txt", True, ""<br> <br><br> DoCmd.SetWarnings False<br> DoCmd.OpenQuery "careercompque", acNormal, acReadOnly<br> <br>DoCmd.TransferSpreadsheet acExport, 8, "careercompque", "d:/das/work/careercomp.xls", True, ""<br><br>Is there a way I can do this.<br><br>Thank You <p> Joe Lawn<br><a href=mailto:jtlawn@hotmail.com>jtlawn@hotmail.com</a><br><a href= > </a><br>