Dave Validation Expression

A

Agent_KGB

Good morning,

I am trying to impove on one of my queries... i have two Date fields i work
with..

One DOB and one Contract End Date... i need to bounce each one and find out
if the date is good...

for DOB i need to make sure that it's not under 18 or over 90 years old... I
think i need to make an IIF statement, just not quire sure how... somethin
glike if DOB > Date()-18 years OR DOB < Date()-90 years... if True then place
Bad DOB in expression field, if false then Good DOB

as for Contract, i just need to know if it's valid so IF ContractDate >
Date() then put "Good Contract" in the expression field, else "Bad Contract"

if you don't have time to explain actual formula, i'd appreciate a link
where i can learn this stuff...

thanks in advance
 
K

KARL DEWEY

Try these --
DOB_Check: IIF(DOB > DateAdd("yyyy", -18,Date()) OR DOB < DateAdd("yyyy",
-90, Date()), "Bad DOB", "Good DOB")

Contract_Check: IIF(ContractDate > Date(), "Good Contract", "Bad Contract")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top