Here is my code. I am bombing at the DoCmd.TransferText line and I'm not sure why. I always get the error message from Err_BadFormat. I've tried .csv, .xls and .txt formats. Thanks.
'IMPORT the file
On Error GoTo Err_BadFormat
filename = "c:\ImportScores.csv"
DoCmd.TransferText acImportDelim, , "tblImportScores", filename
Exit Sub
Exit_cmdImportScores_Click:
Exit Sub
Err_BadFormat:
MsgBox "The file was not imported. Please check the data and reimport before continuing"
Resume Exit_cmdImportScores_Click
Anna Jaeger
iMIS Database Support
'IMPORT the file
On Error GoTo Err_BadFormat
filename = "c:\ImportScores.csv"
DoCmd.TransferText acImportDelim, , "tblImportScores", filename
Exit Sub
Exit_cmdImportScores_Click:
Exit Sub
Err_BadFormat:
MsgBox "The file was not imported. Please check the data and reimport before continuing"
Resume Exit_cmdImportScores_Click
Anna Jaeger
iMIS Database Support