if statement

G

Guest

hello i am new to if statments so please help

i am trying to indicate in a query records that have been placed by saying
if a record has a placements Id (represented as a number... example -100000 )
then the value i want is YES if not then NO

i have tried the following
=iif(<1([placementid]),[yes],[no])

any ideas
 
B

BruceM

NewField: IIf([PlacementID] < 1,"yes","no")

This would be placed at the top of an empty column in query design view. If
you replace NewField: with an = sign the expression can be used as the
control source of a text box. This asumes that [PlacementID] is a field in
the query's source table, and that "yes" and "no" are the actual words you
want to see. Susbstitute whatever name you choose for NewField.
 

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