Not quite what I meant
For future info, use a Debug.Print line so show the result of code in the Immediate window
Anyway starting again ....
You need to link or import your csv file - I suggest link it - and if necessary give it an alias Today
To make this as simple as possible, use the same file name and location for your source data each time you do this
Then use a query or a procedure to append the data
Query version
Code:
INSERT INTO tblclcircles ( xxData, yxdata, zxdata )SELECT 1000*[x] AS xxdata, 1000*[y] AS yxdata, 1000*[z] AS zxdata
FROM Today;
Procedure:
Code:
Sub AppendTodayData()
CurrentDb.Execute "INSERT INTO tblclcircles ( xxData, yxdata, zxdata )" & _
" SELECT 1000*[x] AS xxdata, 1000*[y] AS yxdata, 1000*[z] AS zxdata" & _
" FROM Today;", dbFailOnError
End Sub
NOTE:
1. That's the entire code for the append.
NONE of the recordset code or Dim statements are needed
2. This code will not protect against repeated appending of the same data.
However it can easily be tweaked to prevent that.
Let me know if you need assistance with that
Attached zip file contains an MDB & ACCDB version of this together with a CSV file with 3 random records
The CSV file has been linked already
Use the linked table manager to relink it to the correct location on your PC
Run the code or query.
That's it
HTH