I have a user that sends me his data as a csv file (downloaded from his registration site). Unfortunately, there are more column heads than are needed for our Access program and the number and header names of those "extra" columns can vary. I thought that this would be no problem as I could just import his CSV file as is, creating a table with the same name as the CSV file. Then use an append query to select the field names that are needed for the Access program. (Those field names don't change)
I created an import spec that works fine when selected manually, but am having trouble when trying to automate with VBA. I am using :
DoCmd.TransferText acImportDelim, "ImportSpec", ,strPath & strFile
According to help screen, table name is optional, so left that space blank between commas. Yet, I get a message that I need a table name.
I am using A2003 and A2007. Any help much much appreciated.