For the database I'm writing, I have got a CSV file from another database full of trainee names which I want to import into an Access database. The import side of things is fine - I know how to do that, but the problem I'm having is that the column headers in the text field are labelled
"T_NINUMB", "T_NAME2", "T_NAME1", "U_NAME", "T_PLO"
on the first line if the text file, but I want it to read
"NI", "Surname", "Forenames", "Employer", "TLO"
because that's the name of the column headers in the Access table to import into.
At the moment, I've just got a bit of code to open the file in Notepad and edit it manually, but I want to perform this operation automatically. How would I go about doing it? I suspect it has something to do with the Open statement, reading in the line, checking if it's the first line, if it is, changing it to the second line.
Any ideas on how to go about coding this?
"T_NINUMB", "T_NAME2", "T_NAME1", "U_NAME", "T_PLO"
on the first line if the text file, but I want it to read
"NI", "Surname", "Forenames", "Employer", "TLO"
because that's the name of the column headers in the Access table to import into.
At the moment, I've just got a bit of code to open the file in Notepad and edit it manually, but I want to perform this operation automatically. How would I go about doing it? I suspect it has something to do with the Open statement, reading in the line, checking if it's the first line, if it is, changing it to the second line.
Any ideas on how to go about coding this?