K
KayC
Hi I am running Office2000
I have the below VBA code in an Excel Loop referencing Access
The below will import data from a xls to an mdb table, the xls data to
import changes for every loop.
When I look at the access table it has imported the first dataset n
times rather than import the n datasets into the table once
Can anyone help - I am assuming it may be a refresh issue with the
object link but would be grateful for some direction
Thanks
Kay
Sub ACCESS_Import(strid As String)
Dim appAccess As Access.Application
Dim strDB As String
Dim strXL As String
strDB = mdb
strXL = "xls
Application.ScreenUpdating = False
Set appAccess = New Access.Application
With appAccess
.OpenCurrentDatabase (strDB)
' DoCmd.SetWarnings False
.DoCmd.TransferSpreadsheet acImport, ,
"750_pnl_comparison", strXL, True, strid
' DoCmd.SetWarnings True
.CloseCurrentDatabase
.Quit
End With
Set appAccess = Nothing
End Sub
I have the below VBA code in an Excel Loop referencing Access
The below will import data from a xls to an mdb table, the xls data to
import changes for every loop.
When I look at the access table it has imported the first dataset n
times rather than import the n datasets into the table once
Can anyone help - I am assuming it may be a refresh issue with the
object link but would be grateful for some direction
Thanks
Kay
Sub ACCESS_Import(strid As String)
Dim appAccess As Access.Application
Dim strDB As String
Dim strXL As String
strDB = mdb
strXL = "xls
Application.ScreenUpdating = False
Set appAccess = New Access.Application
With appAccess
.OpenCurrentDatabase (strDB)
' DoCmd.SetWarnings False
.DoCmd.TransferSpreadsheet acImport, ,
"750_pnl_comparison", strXL, True, strid
' DoCmd.SetWarnings True
.CloseCurrentDatabase
.Quit
End With
Set appAccess = Nothing
End Sub