form validation (1 Viewer)

luzz

Registered User.
Local time
Today, 07:11
Joined
Aug 23, 2017
Messages
346
Hi all, Can i ask how to do validation on form?

As i put the validation rule on one of my textbox = <>0
and validation text = "filed cannot be blank"

By right, if the textbox = 0 then when i click onto the save button on my form, it will prompt me the validation text right? But in my case, it did not prompt me any validation text and it save into my table
 

MrHans

Registered User
Local time
Today, 16:11
Joined
Jul 27, 2015
Messages
147
Hi Lizz, blank and zero are different things.
But you can use the Nz function to validate the input:

If Nz(me.txtbox,0) = 0 then
Msgbox "input cannot be blank or 0"
End if
 

luzz

Registered User.
Local time
Today, 07:11
Joined
Aug 23, 2017
Messages
346
Hi Lizz, blank and zero are different things.
But you can use the Nz function to validate the input:

If Nz(me.txtbox,0) = 0 then
Msgbox "input cannot be blank or 0"
End if

Okay, thank you!!
 

Users who are viewing this thread

Top Bottom