Access 2010 Query

i have a table that i want a query to give me record number of each recard that have on of 5 field as empty or 0 rigth now i did this and get only the one that all are empty


Field1         field2        field3        field4      field4
null or 0      null or 0     null or 0   null or 0  null or 0

but if let say record 3 has field3 with 3 in it and the other field null it dont so up in the report
testdb.zip
LVL 1
ntsabmanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rgonzo1971Commented:
Hi,

Is this what you want?

Regards
testdb1.accdb
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mbizupCommented:
This will give you rows where *exactly* one of the five fields is null or 0:

SELECT Table1.N°, Table1.Field1, Table1.field2, Table1.field3, Table1.field4, Table1.field5
FROM Table1
Where ABS((NZ(Field1, 0 ) = 0) + (NZ(Field2, 0 ) = 0) + (NZ(Field3, 0 ) = 0) + (NZ(Field4, 0 ) = 0) + (NZ(Field5, 0 ) = 0)) = 1

Open in new window

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.