Hello.
I have a button that imports a text file into the table. I have set the on click() property of the button as follows.
Private Sub Command34_Click()
On Error GoTo Err_Command34_click
DoCmd.TransferText , "WSPR Import Specification", "WSPECS", "C:\Database\WSPR.txt"
msgbox "success!"
Exit_Command34_Click:
Exit Sub
Err_Command34_click:
MsgBox Err.Description
Resume Exit_Command34_Click
End Sub
If there is an import error ( i.e. the record already exists in the table ), I want to 'Exit Sub' so that it doesn't display the "success" msgbox...
Also, does anyone know how to change the system message for text import errors?
thanks in advance
I have a button that imports a text file into the table. I have set the on click() property of the button as follows.
Private Sub Command34_Click()
On Error GoTo Err_Command34_click
DoCmd.TransferText , "WSPR Import Specification", "WSPECS", "C:\Database\WSPR.txt"
msgbox "success!"
Exit_Command34_Click:
Exit Sub
Err_Command34_click:
MsgBox Err.Description
Resume Exit_Command34_Click
End Sub
If there is an import error ( i.e. the record already exists in the table ), I want to 'Exit Sub' so that it doesn't display the "success" msgbox...
Also, does anyone know how to change the system message for text import errors?
thanks in advance