query

L

leaf

Hello there,

I am creating a report to output a list of subjects from
my tables that are ineligible. I created a query to grab
the fields needed in the report. In a query under
Criteria in the ineligible field, I wrote "if
ineligible=yes". Ineligible is the field name from my
table. Is that the right syntax?

Many thanks,

leaf
 
J

John Vinson

Hello there,

I am creating a report to output a list of subjects from
my tables that are ineligible. I created a query to grab
the fields needed in the report. In a query under
Criteria in the ineligible field, I wrote "if
ineligible=yes". Ineligible is the field name from my
table. Is that the right syntax?

No. The criterion should be just a value of the field; if it's a
Yes/No datatype just use

Yes

or equivalently, -1.
 
P

Pavel Romashkin

if "ineligible" is of Yes-No data type, simply use

SELECT..... WHERE Ineligible

Notice that you have to have a default value for it or make sure to use
Nz() to eliminate Null values from Ineligible.
Pavel
 

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