I have a table with the field "quantity", and the "product ID". I want to calculate "sales = quantity*price" and save this amount in the table.
you can't in a table, you need to use a form. As you have discovered, calculated fields in tables have very limited capability.
if this is for an accounting system, you should store quantity and price plus any other values such as discount and tax as well as sales value.
if a form, you could select a product using a combo (called say productid) that brings through the price - something like
Code:
SELECT ProductID, ProductName, ProductPrice FROM tblProducts
bind the combo to column1, hide columns 1 and 3 so the user only see the product name and set the controlsource to productid
in the combo after update event put code something like
Code:
me.productprice=me.productid.column(2)
me.salesvalue=me.productprice*me.quantity