I have a good function that updates the field EndPrice with the field grossprice I need however to improve the function and update only those products where
the size is less than 6 or < 6. .I have a field called size in the table products.I understand i have to insert also size in the select clause, but how can i formulate the condition ?
All the products with a size greater than 6 should have a 0 Value.
Below is my working function that needs to be changed with the aboce condition.
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("SELECT grossprice, endprice FROM products")
rs.MoveFirst
Do
rs.Edit
rs.Fields("endprice") = EndPrice(rs.Fields("grossprice"))
rs.Update
rs.MoveNext
Loop While Not rs.EOF