Using a query as base for report

G

Grasavong

Hello,
I have created a table where I run a query picking the columns I want in the
query. From the query, I create a report.

My question is this: Whenever I open the report, I want it to show only the
open items. Example: My query has 10 columns, when ALL the fields are
populated, the record is complete and does not need to be in the report (i.e.
open items report). If the 10 fields are NOT all completed, it's still
considered opened and will be on the report when it is run.

I think I'm thinking too much about it and making it sound harder to myself.
Can you please help with suggestions?

Thank you.
 
K

KARL DEWEY

This will test for null --
SELECT YourTable.*
FROM YourTable
WHERE
Nz([Field1],1,0)+Nz([Field2],1,0)+Nz([Field3],1,0)+...Nz([Field10],1,0) = 0;

But if there may be zero lenght string you need to do something different.

WHERE IIF([Field1] Is Null OR [Field1] ="",1,0)+Nz([Field2] Is Null OR
[Field2] ="",1,0)+Nz([Field3] Is Null OR [Field3] ="",1,0)+...Nz([Field10] Is
Null OR [Field10] ="",1,0) = 0;
 

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