Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

syntax error

Status
Not open for further replies.

pooterpooter

Technical User
Oct 7, 2005
11
BG
In my update function i have a syntax error but i cannot find the reason.Can you help me?


Public Function UpdateFields()
Dim strSQLC As String
strSQLC = " UPDATE products INNER JOIN [order details] ON products.productid=[order details].productid SET " & _
" , [order details].cartons = products.branch0 "

CurrentDb.Execute strSQLC

End Function
 

strSQLC = "UPDATE products As A INNER JOIN [order details] As B ON A.productid=B.productid " & _
"SET B.cartons = A.branch0;"

 
The comma between the SET statmement and the involved fields (start of second line) - doesn't it say more than "syntax error"? What happens if you do a debug.print of the string, then copy it (ctrl+g), then paste it into the SQL view of the QBE and run it?

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top