I agree with this, but under certain circumstances it is beneficial to store this value. When this is the case, I leave the fields control source to its original, but write a small procedure (in the form current area) which performs the calculation & then returns the result into the field, hence automatically inserting the value. Something along the lines of the following should do it:
Dim x as integer, y as integer, result as integer
x = me.xfieldname
y = me.yfieldname
result = (x * y) 'Brackets not necessary but can avoid confusion.
me.fieldname = result
It could also be written much more simply as:
(me.xfieldname * me.yfieldname) = me.resultfieldname
Either of these methods will work, but the first will not take into account null values.
James Goodman
j.goodman00@btinternet.com