Update query issue

Joined
Feb 5, 2014
Messages
3
Reaction score
0
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top