Update query not working

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I run the following query by double clicking on it it works fine.

UPDATE tmpWrkPromoWeek1 INNER JOIN tblPromo ON tmpWrkPromoWeek1.DupeKey =
tblPromo.DupeKey SET tblPromo.Scheduled = "Done";


However, if I use the following to run it from code it does not update any
records. Any ideas?

' Mark the promo as DONE
DoCmd.OpenQuery "qupdPromoCurrent", acNormal, acEdit

Help is appreciated.
 
Have you already run it manually so that there are no records left to be
updated? Are there any error messages? What happens if you leave off the
optional arguments?

DoCmd.OpenQuery "qupdPromoCurrent"

What happens if you use this syntax instead?

CurrentDb.Execute "qupdPromoCurrent", dbFailOnError

Have you misspelled the name of the query? Is this a query that has been
saved to the Query window in the main database window?
 
Back
Top