A
Afrosheen via AccessMonster.com
First of all thanks for reading my post.
I have 4 number fields in my table. The default is set to nothing, not 0.
In my form when I click on numbers 1-3 I have no problem. I did a msgbox on
number 3 and 4. Number 3 field shows nothing and no error. Number 4 field
shows a 0 and gives me a null error
I have all the fields dim as integer
Here is my code for number 4 field:
Private Sub Unit4_GotFocus()
MsgBox u4
10 u4 = Unit4
End Sub
Am I doing something wrong? I have fields set up the same way as above and I
don't have a problem.
What I'm trying to do is to compare u4 with the new information in field 4.
Private Sub Unit4_BeforeUpdate(Cancel As Integer)
20 If Unit4 < u4 Then
30 Tot = Tot - Unit4
40 Else
50 Tot = Tot + Unit4
60 End If
End Sub
Again, thanks for your help.
I have 4 number fields in my table. The default is set to nothing, not 0.
In my form when I click on numbers 1-3 I have no problem. I did a msgbox on
number 3 and 4. Number 3 field shows nothing and no error. Number 4 field
shows a 0 and gives me a null error
I have all the fields dim as integer
Here is my code for number 4 field:
Private Sub Unit4_GotFocus()
MsgBox u4
10 u4 = Unit4
End Sub
Am I doing something wrong? I have fields set up the same way as above and I
don't have a problem.
What I'm trying to do is to compare u4 with the new information in field 4.
Private Sub Unit4_BeforeUpdate(Cancel As Integer)
20 If Unit4 < u4 Then
30 Tot = Tot - Unit4
40 Else
50 Tot = Tot + Unit4
60 End If
End Sub
Again, thanks for your help.