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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

update query

Status
Not open for further replies.

peljo

Technical User
Mar 3, 2006
91
BG
I am again having problems with these damned commas, they seem never to conform to my knowledge.I tried to convert the otherwise good and working update query into an sql but i got red colours showing that Access does not accept my commas.I tried with single commas ' or with double commas """" but obviously i jumbled the commas up with no result.Would you help me convert the update query below into an sql ?


UPDATE products SET products.items5 = DLookUp("Diff","qryNetDiff","ProductID=" & [ProductID])
WHERE (((products.Productid) In (SELECT ProductID FROM qryNetDiff)));
 
You are talking about qoutation marks, not commas. This is a comma
Code:
[b],[/b]

I think you will get a much more efficient query by joining the tables rather than doing a DLookup
Code:
UPDATE qryNetDiff INNER JOIN products ON qryNetDiff.Productid = products.Productid SET products.items5 = qryNetDiff.Diff



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top