Validation rules

superrob5

Registered User.
Local time
Today, 22:05
Joined
May 8, 2003
Messages
99
I am just curious to know in a table that i have inorder I have
MRN, Firstname, last name, initialvisit, and other fields below. I have set validation on those fields as is not null give an error.


Now when Iput this into a form with a save button. If the user enters just the MRN number the error says InitialVisit cant be null. Why doesnt it check for Firstname first. It will later as they enter in more information. Is it becasue InitialVisit is a date???

Rob
 
What is your TAB order on the form for the fields?
 
I knew that could have been the problem. I have checked that again just incase and still have this problem. This is the order that when saving on the form that I get error for null
InitialDate
HIVPRETEST
Trimester
EXP Del
DOB
LName
FName
Insurance


I want :

LName
FName
DOB
Initiavisit
HIVPRETEST
Trimester
EXP Del
Insurance
I have no idea on how to fix this problem. I thouhgt the tab order would but I am not sure. I have attached the db
 

Attachments

Go to your Log table Design View and change the order of fields. Rightnow you have ID, MRN, InitialVisit, LName, Fname...
Move InitialVisit field after FName or in whatever order you want it. That might work.

HTH
Ekta
 
Of course I don't really see where this is an issue. Since NULL is an issue, why not put validation in your form, or if you want, in before update put some code to check the fields. I really don't like letting the DB do the validation for you, what if MS in it's wisdom decides to chage how that works, then it is redesign time.
 

Users who are viewing this thread

Back
Top Bottom