Unanswered: Look at a table row by row and import data from a file based on a path in that row
[I posted this in the ACCESS section but have now realised it may have been in the wrong place, sorry]
Hi everyone, its my first time writing, but I have used this site before and its proved so helpful - thank you.
I've seen this done before, but for the life of me cannot figure out how to write it.
I have a table, in ACCESS, tbl_filelist that contains the paths and file name for excel files in 2 columns: 'path' and 'filename'. Through Visual Basic I want to import a range, 'sick_data', from each file. The import part is simple enough; its just the part of getting the code to look at each row in a table in sequence that baffles me.
Last edited by MASARU; 11-09-04 at 08:44.
Reason: further detail
just incase any are interested, from several sources i managed to peice this together:
Private Sub updatesource_Click()
Dim rst As DAO.Recordset
Dim strTable As String
Dim strMessage As String
strTable = "SELECT SubFolder & " / " & FileName AS [FullPath] FROM tbl_FileList;"
Set rst = CurrentDb.OpenRecordset(strTable, dbOpenDynaset)
If Not .EOF And Not .BOF Then
Do While Not .EOF
strMessage = "open " & .Fields("FullPath")