sorry for being critical but ur code isn't logic.
I think u use it in a for loop or something. To validate a list of values and make the calculations?
Else, maybe u use it in a combo to select a value and make the calculations in a form.
Why docmd.runcommand accmdsaverecord?
what is ur idea with this rule?
why making (unbound, I hope) textboxes for the values?
try Nz(me.x,0)*<values), the Nz function disables Null failures, look at the help files
maybe this function works better
Public Sub CalculaLinha()
var x as double
If Me.combo1.Column(5) = "V" Then 'VALOR
x=nz(me.Y,0)
Else
x= nz(me.Y,0)*2
End If
me.k=nz(x,0)*1030.33
form_projectos.CalculaTotais 'this function is in the main form
End sub
If u don't need y,k (only for the function CalculaTotais) then make also variables. Maybe the null failure is in the CalculaTotais function.
Hope this helps, else u can come back but be informative. So it's not clear to me now what ur idea behind the variabels is, first rule in databases:calculatedvariables never store in tables!!
Gerard