Update and Delete sql problems

G

Guest

Hey all,

I have an update query and a delete query as shown below. Both of them
register no errors but nothing happens, they don't work. I'm guess they're
just not finding the records but I don't understand why. Let me know if there
is something wrong with my syntax.

***UPDATE QUERY***

strupdate_Time = "UPDATE tbl_Time_Tracking_Details " & _
"SET tbl_Time_Tracking_Details.Job_No = " & _
"REPLACE(Job_No, '" & Me.quote_ID & _
"' , '" & Project_No & "-000', 1, -1, 2) " & _
"WHERE tbl_Time_Tracking_Details.Job_No LIKE " & _
"'" & Me.quote_ID & "%'"

CurrentDb.Execute strupdate_Time, dbFailOnError

***DELETE QUERY***

strdel_jobs = "DELETE FROM tbl_Jobs WHERE tbl_Jobs.Job_No LIKE " & _
"'" & Me.quote_ID & "%'"

CurrentDb.Execute strdel_jobs, dbFailOnError

Should I be using DAO recordet instead?

RY
 
D

Douglas J Steele

You're using DAO to run the queries. The wildcard character for DAO is *,
not %.
 

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