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

The search key was not found in any record

Status
Not open for further replies.

barra47

Programmer
Dec 25, 2002
86
0
0
AU
I am trying to do a simple update query based on records match between 2 tables
but when i run the qry I get the error nessage

"The search key was not found in any record"



UPDATE [labour detail admin copy] INNER JOIN [Temp tbl] ON [labour detail admin copy].LD_ID = [Temp tbl].[ID Number] SET [labour detail admin copy].Scope = [Temp tbl]![Scope]
WHERE ((([labour detail admin copy].LD_ID)=[Temp tbl]![ID Number]));


Both join fields are Primary key fields

Can abyone help with this problem

Thanks in advance.
 

I'd try running the query without the WHERE clause.

Randy
 
Here is the way I did it before.... (from dbForums)

UPDATE tblData
SET tblData.Total = SUM(P.Amount)
FROM TableP P, tblData D
WHERE P.Acct = D.Acct
AND P.Type = 'PUR'
GROUP BY D.Acct


Steve Medvid
IT Consultant & Web Master

Chester County, PA Residents
Please Show Your Support...
 
Thank you all for your replies

I found the problem was not in my query. Some of the records were corrupt the records were corrupt.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top