import spec: order in which they are loaded in the table

I have a import spec from a comma deliminated file.  I need to load the items into the table in the order that they appeared in the .csv file. How?

(or at least i have to have some way of determining where they where in the file)
vbnetcoderAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

Rey Obrero (Capricorn1)Commented:
to be able to determine which records came from which file
- add a field to your destination table and name it "Source"

after the import line run an update query to update the "source" field with the filename of the source

currentdb.execute "update tablex set [source]= '" & fileName & "' where [source] is null"
PatHartmanCommented:
After you import the data, add an autonumber column.  That will be assigned based on the physical sequence of the data which presumably was the order in which it was imported.

If you are appending to an existing table, make sure the table already has an autonumber defined.

Later on, sorting by the autonumber column will give you data entry order.
vbnetcoderAuthor Commented:
Pat Hartman -

So as long as i have the auto number in the table that will be the order in which they where in the source file? If so that would be perfect for what i need.
PatHartmanCommented:
Using TransferText does not sort the input data so it gets loaded as it came from the text file.  I am not so confidant about Excel.  With a text file, you can open it with a text editor and see exactly what it contains.  Spreadsheets are much more complex formats and the newer versions of Excel actually use XML to store the data.  Given that, I don't know if what you "see" when you view the workbook is would you would "see" reading the XML using TransferSpreadsheet.

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
vbnetcoderAuthor Commented:
ty
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.