I have the following working updating function which is ok:
CurrentDb.Execute "UPDATE Products SET office = products.grossprice*0.72"
I want to add on a condition depending on the field “code” in the same table products. But I do no know how to do it.I do not want to use a form but otherwise is it possible to do it ?
What I want to achieve is the following:
If Products.code = 10153 or Products.code = 10567 or Products.code = 324555 Then
CurrentDb.Execute "UPDATE Products SET office = products.grossprice*0.72"
Else
CurrentDb.Execute "UPDATE Products SET office = products.grossprice*0.9"
How can I do it with Currentdb.execute command?