We have a database in which we created a macro on the OnClick for a button. When the end-user presses the button a text file is automatically imported into the database using import specifications we set up. Here is the code we used in the macro:
DoCmd.TransferText, acImportFixed, AutoClaim Import Specification, AutoClaim, c:\AutoClaim.txt, "0"
In this code, "AutoClaim Import Specification" is the name of the specs file, "AutoClaim" is the name of the table we are importing the data to, and "c:\AutoClaim" is the path to the text file, and the 0 siginfies that the first row of data in the text file is not column names.
This code works, it imports the text file into a table in our database. The problem is that when you run the macro the next time, it appends the data to the same table. We were hoping it would overwrite the data in the table. Does anyone know if this is possible? Thanks for the help.
DoCmd.TransferText, acImportFixed, AutoClaim Import Specification, AutoClaim, c:\AutoClaim.txt, "0"
In this code, "AutoClaim Import Specification" is the name of the specs file, "AutoClaim" is the name of the table we are importing the data to, and "c:\AutoClaim" is the path to the text file, and the 0 siginfies that the first row of data in the text file is not column names.
This code works, it imports the text file into a table in our database. The problem is that when you run the macro the next time, it appends the data to the same table. We were hoping it would overwrite the data in the table. Does anyone know if this is possible? Thanks for the help.