Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Error Msg instead of Mine

Status
Not open for further replies.

Dummy99

Programmer
Apr 25, 2002
30
0
0
FR
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
 
Well it may be getting the error before it gets to your code
Did you try steping through one line at a time?
DougP, MCP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top