Ok, I need some help.
When I run through the routine I am trying to automate manually, I get no errors on my import.
When I automate the routine using a macro, I am getting an error table with errors.
My macro looks like this:
Private Sub cmdImport_Click()
On Error GoTo Err_cmdImport_Click
DoCmd.TransferText acImportDelim, , "tblTicketList", Me!Text1, True
Exit_cmdImport_Click:
Exit Sub
Err_cmdImport_Click:
MsgBox Err.Description
Resume Exit_cmdImport_Click
End Sub
Which is attached to a button on a form as an event procedure.
The errors I am getting are on 2 specific fields zip and Secondary telephone.
It only happens when the zip is in the xxxxx-xxxx format rather than xxxxx
and the secondary phone number error happens when is says "uknown" in the column.
Both fields are text fields not number fields in the table so it should not have a problem with either columns.
What is confusing me is that it works doing the File ->Get External Data -> Import routine.
Do I need to add a spec? Is it seeing it as a number field without the spec instead of text?
Thanks!
When I run through the routine I am trying to automate manually, I get no errors on my import.
When I automate the routine using a macro, I am getting an error table with errors.
My macro looks like this:
Private Sub cmdImport_Click()
On Error GoTo Err_cmdImport_Click
DoCmd.TransferText acImportDelim, , "tblTicketList", Me!Text1, True
Exit_cmdImport_Click:
Exit Sub
Err_cmdImport_Click:
MsgBox Err.Description
Resume Exit_cmdImport_Click
End Sub
Which is attached to a button on a form as an event procedure.
The errors I am getting are on 2 specific fields zip and Secondary telephone.
It only happens when the zip is in the xxxxx-xxxx format rather than xxxxx
and the secondary phone number error happens when is says "uknown" in the column.
Both fields are text fields not number fields in the table so it should not have a problem with either columns.
What is confusing me is that it works doing the File ->Get External Data -> Import routine.
Do I need to add a spec? Is it seeing it as a number field without the spec instead of text?
Thanks!
Last edited: