Invalid Argument Error When Running docmd.transfertext Twice

When I run the following code... either in a row or in 2 different spots in the code I get an "Error Invalid Argument" when trying to execute the second docmd.transfertext.

Is there a a way to take the same data and import it into 2 different tables at the same time... or after importing copy the data from one table to the other?
DoCmd.TransferText acImportDelim, "Grps Import Specification", "Grps", "C:\Grps_" & Yr & Mth & Dy & ".txt"
        
DoCmd.TransferText acImportDelim, "Grps Import Specification", "NewGrps", "C:\Grps_" & Yr & Mth & Dy & ".txt"

Open in new window

rgrguricAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TextReportCommented:
You can create an append query that appends all records from Grps to NewGrps, probably quicker than teh import also. If you create the query through the QBE then drag each field from Grps down and it should match top the fields in NewGrps. Below is the basic SQL Statement required

INSERT INTO NewGrps (Field1,Field2)
SELECT Field1,Field2 FROM Grps

Cheers, Andrew
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.