I import a text file into a TABLE where duplicat keys are not permitted. If I have a duplicat condition, instead of getting my error message I get the Access generalized message saying unable to import all data...
My code is:
On Error GoTo Import1_Err
DoCmd.Echo False, True
DoCmd.TransferText acImportDelim, "", "Info", "C:\F&A\IOTbl.txt", True, ""
.
.
.
Import1_Err:
DoCmd.Echo True, True
Beep
MsgBox "INFO Import Not Successful.", _
vbOKOnly, "Import"
MsgBox Error$
Exit Sub
How do I get it to go to my error routine?
Thanks,
Dummy99
My code is:
On Error GoTo Import1_Err
DoCmd.Echo False, True
DoCmd.TransferText acImportDelim, "", "Info", "C:\F&A\IOTbl.txt", True, ""
.
.
.
Import1_Err:
DoCmd.Echo True, True
Beep
MsgBox "INFO Import Not Successful.", _
vbOKOnly, "Import"
MsgBox Error$
Exit Sub
How do I get it to go to my error routine?
Thanks,
Dummy99