Computation in textbox

bremensleash

Registered User.
Local time
Tomorrow, 07:17
Joined
Jul 15, 2008
Messages
24
Hello everyone

Does anyone know how to return a null into a computation.

for example


textbxa textbxb textbxc
3785.2 - 0 =

I want textbxc value to become 0

i tried the nzproperty but its not working.
k_2 = Nz(sp_2, 0) - Nz(sp_1, 0)

what i want to do is whenever a number is deducted to 0 it will also become 0. like in multiplication.

is this possible? :confused::confused:
 
Try this:

If sp_1 > 0 Then
k_2 = Sp_2 - Sp_1
Else
k_2 = 0
End If
 
why is this not working?

this is using nz eaxactly as it should be used

k_2 = Nz(sp_2, 0) - Nz(sp_1, 0)

assuming k_2, sp_1 and sp_2 are all numeric
 

Users who are viewing this thread

Back
Top Bottom