Convert zero values to null in form

Taurus05

Registered User.
Local time
Today, 05:28
Joined
Mar 29, 2005
Messages
31
Hi,

I would like to convert zero if enter into null value during the data entry phase in a form. This means that zero values will be stored as null values. Is there a way? I am not able to do it in the input mask somehow.

Thanks for any help in advance.
 
This can be adjusted in the BeforeUpdate event of the control:
Code:
Private Sub [b]txtBox[/b]_BeforeUpdate(Cancel As Integer)

If Me.[b]txtBox[/b] = 0 Then
   Me.[b]txtBox[/b] = Null
End If

End Sub
Replace txtBox with the name of your control.
 

Users who are viewing this thread

Back
Top Bottom