what code would i need to stop the vb code finishing before the query has finished updating. i have tried a time delay code but it delays the query as well and im left with the code running from un updated info?