L
LJG
Hi Nikos,
You recently helped me sort an issue with regard to importing multiple
spreadsheets, and the suggestion you gave worked perfectly, however, since
doing this I have had a thought that some records might need to update
rather than a straight import, any tips on how I could code that to update
or append in that instance?
The code I have added is:
Thanks again for your help
Les
You recently helped me sort an issue with regard to importing multiple
spreadsheets, and the suggestion you gave worked perfectly, however, since
doing this I have had a thought that some records might need to update
rather than a straight import, any tips on how I could code that to update
or append in that instance?
The code I have added is:
Sub Mass_Import()
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim strSS As String
Set db = CurrentDb
Set rst = db.OpenRecordset("tblUsers") 'the name of the table
rst.MoveFirst
Do Until rst.EOF
strSS = "C:\database\dataimports\Prospects_" _
& rst.Fields("UserName") & ".xls" 'the name of the field
If Dir(strSS) <> "" Then
DoCmd.TransferSpreadsheet acImport, 8, "tblmamprospects", _
strSS, True, ""
End If
rst.MoveNext
Loop
rst.Close
Set rst = Nothing
Set db = Nothing
End Sub
Thanks again for your help
Les