Oh, Dear Friends,

I have a problem in using DoCmd.RunSQL again. This time I wish to update the old data in one table from another newly added table that contains fresh data.

My code is:
sSQL = "UPDATE Stock SET " & _
"Name=" & MyTableName & ".Name " & _
"FROM " & MyTableName & " " & _
"WHERE Stock.Ticker=" & MyTableName & ".Ticker"

' Run the SQL on the Access mdb from my program
accApp.DoCmd.RunSQL sSQL


My SQL statement is (when debug.print):

UPDATE Stock SET Name=TempTable.Name FROM TempTable WHERE Stock.Ticker=TempTable.Ticker

What's wrong with it? Can u help me to point this out? Thanks a lot.