G
Guest
Hi Please help.
This below is my current import code for linking an excel spreadsheet into a
table and running an append query. I am looking to get rid of the append
query and write as an sql in the import code an update query that will update
from another table into my temp table.
Private Sub cmdLoadData_Click()
strPath = "\\w2k6001\data\NCHO\Housing Services\Data Warehouse\Weekly
CSAT Report\"
strFileName = Dir(strPath & "NPSReport.xls")
strTempTable = "tblAddressTemp"
MsgBox "Data Loading...", vbInformation
If Len(strFileName) <> 0 Then
DoCmd.TransferSpreadsheet acLink, , strTempTable, strPath &
strFileName, True
CurrentDb.Execute ("qappAddress"), dbFailOnError
DoCmd.DeleteObject acTable, strTempTable
End If
MsgBox "Import Complete", vbInformation
End Sub
Thanks,
Jez
This below is my current import code for linking an excel spreadsheet into a
table and running an append query. I am looking to get rid of the append
query and write as an sql in the import code an update query that will update
from another table into my temp table.
Private Sub cmdLoadData_Click()
strPath = "\\w2k6001\data\NCHO\Housing Services\Data Warehouse\Weekly
CSAT Report\"
strFileName = Dir(strPath & "NPSReport.xls")
strTempTable = "tblAddressTemp"
MsgBox "Data Loading...", vbInformation
If Len(strFileName) <> 0 Then
DoCmd.TransferSpreadsheet acLink, , strTempTable, strPath &
strFileName, True
CurrentDb.Execute ("qappAddress"), dbFailOnError
DoCmd.DeleteObject acTable, strTempTable
End If
MsgBox "Import Complete", vbInformation
End Sub
Thanks,
Jez