If not null then

teiben

Registered User.
Local time
Today, 20:55
Joined
Jun 20, 2002
Messages
462
I guess my brain is locked up....as I can't get the validation code to work correctly. I have a text field txtquantity which if contains a value then txtdesc must too contain a value. BUt if txtquantity is null then txtdesc should be null too. Help would be greatly appreciated
 
i think you should use 2 validations like this

if (((not isnull(f1)) or (f1<>"")) and ((isnull(f2)) or (f2=""))) then

msgbox("Please enter the value in the second box")

end if

if (((isnull(f1)) or (f1="")) and ((not isnull(f2)) or (f2<>""))) then

msgbox("Please enter the value in first box or remove the value from the second box")
end if
 
I put it on the beforeupdate in the form. It does work, but the record will still save if F1 contains a value and F2 doesn't. Any other suggestions?
 

Users who are viewing this thread

Back
Top Bottom