C
chris0309 via AccessMonster.com
Hi All,
I have got a transfer text statement to work which imports the new data from
the file ito the database table. However when the file is not there or miss
spelt its bringing up a run time error 3011. What im trying to do within the
code below is to catch the run time error and replace with my own message
however I get get it to work, its still bringing up the error.
Anyone got any ideas, much appricated.
Chris
Private Sub Command18_Click()
DoCmd.TransferText , "Test Import Specification", "Tabe1", "C:\test.csv",
True
message = MsgBox("File Upload complete", YesNo, "File Upload")
Me.Performance_Metrics_Capture_Job_Data_Sub_Form.SetFocus
Me.Command18.Enabled = False
End Sub
Private Sub Form_Error(DataErr As Integer, Response As Integer)
If DataErr = 3011 Then
MsgBox ("There is no file within the C drive called test.txt")
End If
End Sub
I have got a transfer text statement to work which imports the new data from
the file ito the database table. However when the file is not there or miss
spelt its bringing up a run time error 3011. What im trying to do within the
code below is to catch the run time error and replace with my own message
however I get get it to work, its still bringing up the error.
Anyone got any ideas, much appricated.
Chris
Private Sub Command18_Click()
DoCmd.TransferText , "Test Import Specification", "Tabe1", "C:\test.csv",
True
message = MsgBox("File Upload complete", YesNo, "File Upload")
Me.Performance_Metrics_Capture_Job_Data_Sub_Form.SetFocus
Me.Command18.Enabled = False
End Sub
Private Sub Form_Error(DataErr As Integer, Response As Integer)
If DataErr = 3011 Then
MsgBox ("There is no file within the C drive called test.txt")
End If
End Sub