I have the following VBA code:
Dim dkg As Variant, str As String
dkg = Application.FileDialog(msoFileDialogFilePicker).Show
str = Application.FileDialog(msoFileDialogFilePicker).SelectedItems(1)
DoCmd.TransferText acImportDelim, "OnyxSRImportSpecification", "Onyx_Allocation_Import", _
str, False
Here is the data I am trying to import:
RCG,Onyx,&70670637,706JAY,359,11/17/2011,12/31/2012,12/31/2012,NO,NO
Onyx_Allocation_Import is a table in SQL Server 2008 R2 and is a linked table. The import specification is delimited using .csv. All fields in the table are Varchar(50) and the table fields in Access show up as Text.
Every time I try to import this row I get the following error message:
Run-time error '3001':
Invalid argument.
I have tried several suggestions found on Goggle with no success (setting all fields to varchar, adding false at the end of the docmd). Does anyone have any suggestions?
Thanks for any help in advance.
Dave
Dim dkg As Variant, str As String
dkg = Application.FileDialog(msoFileDialogFilePicker).Show
str = Application.FileDialog(msoFileDialogFilePicker).SelectedItems(1)
DoCmd.TransferText acImportDelim, "OnyxSRImportSpecification", "Onyx_Allocation_Import", _
str, False
Here is the data I am trying to import:
RCG,Onyx,&70670637,706JAY,359,11/17/2011,12/31/2012,12/31/2012,NO,NO
Onyx_Allocation_Import is a table in SQL Server 2008 R2 and is a linked table. The import specification is delimited using .csv. All fields in the table are Varchar(50) and the table fields in Access show up as Text.
Every time I try to import this row I get the following error message:
Run-time error '3001':
Invalid argument.
I have tried several suggestions found on Goggle with no success (setting all fields to varchar, adding false at the end of the docmd). Does anyone have any suggestions?
Thanks for any help in advance.
Dave