if you are talking about validating boxes on a form for 1 record:
usage:
if IsValidForm() then 'do stuff
'run data process macro
else
'user must correct entries
end if
Code:
public Function IsValidForm() as boolean
dim vMsg
Code:
select case true
case txtName = ""
vMsg = "Client Name is missing"
case isnull(cboState )
vMsg = "State is missing"
cboState.setfocus
end select
if vMsg <>"" then msgbox vmsg,vbCritical,"Required"
IsValidForm =vMsg =""
end sub
If you are talking about validating the values in the table, you should use queries to validate. (not code)
Q1 can verify if field is numeric
Q2 can check if date < today
etc.
the query also shows the validation checked:
in Q1: Caption: Xfield must be numeric
put all the queries into a macro, then run macro.
if all records are zero then all data is valid.