import delimited text file data into ms access

  • Thread starter Thread starter krishnaN
  • Start date Start date
K

krishnaN

hi all,

Please help me..

I am doing a application in Ms Access 2003.
I have 3 text files(Tab delimited data) like :
050825acrdata,
050826AccessUSR,
050826segsolution.

So i need to upload these files in to their respective tables(acrdata,
AccessUSR, segsolution).

I was using "DoCmd.TransferText" but it is not working.
I want to use VBA code.
As i know:-
1. upload file and add that data into a recordset by adding &
updating.
2. and with that recordset we can update that table data. but this
should be dynamically depending upon on the file name.

suppose if user uploaded 050825acrdata.txt, it should be appended to
Table acrdata.

so kindly help me to solve this solution, and even i need guidence to
complete. pleaseeeee experts.!
 
What is not working about the TransferText? Perhaps we can fix that problem
to save you some coding?
 
thanks for your reply,

I can use transfer text, but these uploading should work on dynamic
selection.
like if user selects 050625acrdata.txt, it should upload to Table
acrdata(the letters in the file name after number indicate table name)

and also there is another condition
1. There is a addtional field in these Tables "Status" , If record
exists uploaded data and also in table then status filed should be
appended as E (as existing user),
2. if record appears in table and not appeared in uploaded data then
that record status should be appended as D (as deleted user)
3. if record appears in uploaded data but not in tables then that
record status should be appended as N (as New customer)
 
I would suggest you create tables that have the same structure as the tables
you want the data in and import all the data in the text file with the
TransferText method. The create queries to filter the records and put them
in the final tables.
 
Back
Top