G
Geoff Salmon
I want to create a series of tables from a series of Excel spreadsheets. I
have set up a table with the list of the spreadsheets called 'stcknames'.
I then used a command to go to each record in that table. That seems to
work. But I don't know how to access that record and use it as a variable
in the next command set out below. I am missing something basic. I don't
know how to capture the record as then use it as a variable, call it
'nwtable'.
Any help would be appreciated and if the approach itself is misguided, I
would appreciate further direction.
Here is what I have tried to date
Sub NewTabl()
For n = 1 To 2
DoCmd.GoToRecord acDataTable, "stcknames", acGoTo, n
nwtble = ???
DoCmd.TransferSpreadsheet acImport, 8, _
nwtble, "C:\GeoffsFolders\stockdata\stcknames.XLS", True, "a1:f765"
Next n
End Sub
have set up a table with the list of the spreadsheets called 'stcknames'.
I then used a command to go to each record in that table. That seems to
work. But I don't know how to access that record and use it as a variable
in the next command set out below. I am missing something basic. I don't
know how to capture the record as then use it as a variable, call it
'nwtable'.
Any help would be appreciated and if the approach itself is misguided, I
would appreciate further direction.
Here is what I have tried to date
Sub NewTabl()
For n = 1 To 2
DoCmd.GoToRecord acDataTable, "stcknames", acGoTo, n
nwtble = ???
DoCmd.TransferSpreadsheet acImport, 8, _
nwtble, "C:\GeoffsFolders\stockdata\stcknames.XLS", True, "a1:f765"
Next n
End Sub