Solved

Importing text file into access - deleting first record

Posted on 2014-01-27
3
945 Views
1 Endorsement
Last Modified: 2016-03-31
Hi Experts,

I have created a program in microsoft access VBA where I import a text file into an already created table in my database.  For some reason every time i import the file it deletes the first record.  

Here is my import specification code
DoCmd.TransferText acImportDelim, "scanner import specification", "scanner", Me.FName, True

Open in new window


My 'scanner import specification' that i have set are not set to skip the first line.  In the preview of the import it shows all the data there, but whenever i import the first line is always missing.  Whenever I add a blank line in my text file it seems to work.

Thanks
1
Comment
Question by:Natspap
3 Comments
 
LVL 35

Accepted Solution

by:
PatHartman earned 500 total points
ID: 39812490
The "True" at the end of the Import expression says that the file contains column headings.  If it doesn't, then Access would delete the first data line when doing the import.
0
 

Author Closing Comment

by:Natspap
ID: 39812519
Worked perfect after i removed it!  Thank you!
1
 

Expert Comment

by:Treblok
ID: 41530692
Thank you so much. Easy fix. ;-)
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question