Hi all,
I am trying to update an Access table from an Excel sheet
When I run the query, the table is not updated.
Here is my query:
UPDATE Employee INNER JOIN TeamUnitInput ON Employee.DAS = TeamUnitInput.[Employee DAS number] SET Employee.Mobile = TeamUnitInput.[Mobile phone]
WHERE Employee.DAS = "A548277";
If I do this and debug, it works ???
Public Function MgtTool_Main()
Dim db As Database
Dim rs As Recordset
Dim strSQL As String
Dim bAllYear As Boolean
Dim lNumberForecast As Long
Dim lNumberInput As Long
On Error GoTo Err_MgtTool_Main
Set db = CurrentDb
strSQL = "UPDATE Employee INNER JOIN TeamUnitInput ON Employee.DAS = TeamUnitInput.[Employee DAS number] SET "
strSQL = strSQL + " Employee.Mobile = TeamUnitInput.[Mobile phone]"
strSQL = strSQL + " WHERE Employee.DAS = 'A548277';"
db.Execute strSQL
db.Close
I become mad, can somebody help me ?
Thanks a lot,
Juraph
TeamUnitInput: link to an Excel sheet
The titles are right.
Access 2010
I am trying to update an Access table from an Excel sheet
When I run the query, the table is not updated.
Here is my query:
UPDATE Employee INNER JOIN TeamUnitInput ON Employee.DAS = TeamUnitInput.[Employee DAS number] SET Employee.Mobile = TeamUnitInput.[Mobile phone]
WHERE Employee.DAS = "A548277";
If I do this and debug, it works ???
Public Function MgtTool_Main()
Dim db As Database
Dim rs As Recordset
Dim strSQL As String
Dim bAllYear As Boolean
Dim lNumberForecast As Long
Dim lNumberInput As Long
On Error GoTo Err_MgtTool_Main
Set db = CurrentDb
strSQL = "UPDATE Employee INNER JOIN TeamUnitInput ON Employee.DAS = TeamUnitInput.[Employee DAS number] SET "
strSQL = strSQL + " Employee.Mobile = TeamUnitInput.[Mobile phone]"
strSQL = strSQL + " WHERE Employee.DAS = 'A548277';"
db.Execute strSQL
db.Close
I become mad, can somebody help me ?
Thanks a lot,
Juraph
TeamUnitInput: link to an Excel sheet
The titles are right.
Access 2010