Hello all!
i am importing several data files into one database in Access. I am trying to code a list field with the file names the data was imported from, using a SQL statement. This is what i have so far:
The red line is the SQL statement i came up with that is not working, any help would be awesome!Code:If Right(objF1.Name, 3) = "CSV" Then FileName = objF1.Name DoCmd.TransferText acImportDelim, "ImportSpec", "ELDO_COMBINED", orgLocation & objF1.Name, False DoCmd.SetWarnings False DoCmd.RunSQL "UPDATE ELDO_COMBINED '" & FileName & "' WHERE ELDO_COMBINED.LIST IS NULL ;" DoCmd.SetWarnings True MsgBox objF1.Name End If Next


Reply With Quote
