SamirNaenenjad
Programmer
I have the following code to import a text file into access:
db.Execute "DELETE * FROM tblTest"
DoCmd.TransferText acImportDelim, "ImportSpec", "tblTest", "c:\Test.txt", True
The problem is that I imediately run some queries through ADO that manipulate the data, but when I open the table in a recordset I get 0 records. If I do 10K "DoEvents" before opening the table, I get the whole table.
So long story short, is there anything I can test for to see if the text import is finished, or do I just have to guess based on the file size how many loops I need to run through before manipulating the table?
Thanks in advance,
A.J.
db.Execute "DELETE * FROM tblTest"
DoCmd.TransferText acImportDelim, "ImportSpec", "tblTest", "c:\Test.txt", True
The problem is that I imediately run some queries through ADO that manipulate the data, but when I open the table in a recordset I get 0 records. If I do 10K "DoEvents" before opening the table, I get the whole table.
So long story short, is there anything I can test for to see if the text import is finished, or do I just have to guess based on the file size how many loops I need to run through before manipulating the table?
Thanks in advance,
A.J.