Stuart Green
Registered User.
- Local time
- Today, 12:21
- Joined
- Jun 24, 2002
- Messages
- 108
My users have runtime only so are restricted by what they can do (the import option is not open to them). They regularly receive a lot of .csv files that have only one field in them but usually about 2,000 records and they need to be able to append the data from these to one table in access. (They subesquently look for duplications). Ideally what I would like them to be able to do is have a form with a button that will select the file path to the file they want to import/append and then add the data from this to the table. I would also like to stamp each record imported/appended with the date imported and the file path so that any duplications found can be tracked back to the source .csv file.
I have created the form to get the file path OK and this shows in the form field as an object named "txtfilepath" but am stuck as to do the rest as the append query requires a database name to append from.
One other way I have tried is transfer text (though this doesn't help with my need to date stamp each record)
I have created an import specification called "imei" and have tried doing an import as follows
stDocName = [Forms]![frm_imei_select]![txtFilePath]
DoCmd.TransferText acImportFixed, "imei", "tbl_imei", "stdocname", False, ""
but this just returns a message box saying can't import this file
Any pointers in the right direction would be much appreciated, otherwise I will have to do the appends one by one for them!
I have created the form to get the file path OK and this shows in the form field as an object named "txtfilepath" but am stuck as to do the rest as the append query requires a database name to append from.
One other way I have tried is transfer text (though this doesn't help with my need to date stamp each record)
I have created an import specification called "imei" and have tried doing an import as follows
stDocName = [Forms]![frm_imei_select]![txtFilePath]
DoCmd.TransferText acImportFixed, "imei", "tbl_imei", "stdocname", False, ""
but this just returns a message box saying can't import this file
Any pointers in the right direction would be much appreciated, otherwise I will have to do the appends one by one for them!