davetough
asked on
create field in query w/conditional statement
hello,
i have attached example db-
is there a way to add a field to qry1 -[newfield]
that has conditional statement that says:
if field 111 or 222 is checked then the newfield has 5 entered
and if field 333 or 444 is checked the newfield has 6 entered
thank you
database2.mdb
i have attached example db-
is there a way to add a field to qry1 -[newfield]
that has conditional statement that says:
if field 111 or 222 is checked then the newfield has 5 entered
and if field 333 or 444 is checked the newfield has 6 entered
thank you
database2.mdb
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you - GREAT
SELECT tbl1.ID, tbl1.[item number], tbl1.[111], tbl1.[222], tbl1.[333], tbl1.[444], tbl1.[model number], IIf([111]=-1 Or [222]=-1,5,IIf([333]=-1 Or [444]=-1,6,0)) AS Expr1
FROM tbl1;