Link to home
Start Free TrialLog in
Avatar of lucyLuna
lucyLuna

asked on

Y/N field Report in Access 2010

My query has CustID, CustName, ServiceDate, and CarWash.

CarWash is a y/n field
CarWash Cost (Currency field)

Not all customers want a car wash, but my report shows all customers regardless if Car Wash is checked or not.

How can I make my report show only those CarWash Fields which = yes?

I've tried; Yes/no, Y,  1, True (QBE Criteria)
Also tried ; CarWash Cost >1 (QBE criteria)

But no luck

Thanks much,

Lucy
Avatar of Flyster
Flyster
Flag of United States of America image

Your query should look something like this:


SELECT YourTable.[CustID], YourTable.[CustName], YourTable.[ServiceDate], YourTable.[CarWash]
FROM YourTable
WHERE (((YourTable.[CarWash])=Yes));

Flyster
Avatar of lucyLuna
lucyLuna

ASKER

Hi FLyster, the WHERE Statement goes in the Criteria field of the query?

Thanks much!
lucyluna,

here is someUser generated imageUser generated imageUser generated image QBE view of the query
Flyster, I figured out...and your solution works works great.

 *********but how do I add more selections, for example:

CarWash, WindowRepair, CarDetail...etc...I have six fields do I add each on the WHERE Clause? separated by a comma?***********

I am accepting your solution

Thanks so much!

Lucy
SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
@Capricorn1, I tried that prior to asking my question...and those options did not work...Flyster's solution worked, so I am accepting it.

Thanks for jumping in...I need all the help I can get :)


Thanks again,

Lucy
Lucy,
If any of the queries i posted did not work, and you are sure that the field is Yes/No Type
Your db have a big problem..

Try doing a compact and repair and also check if you have missing references in your VBA module
Capricorn1, The fields are y/n type, and the report is now pulling fine...the only thing I need to do is add the additional fields as you suggested using the AND/OR in SQL window of the query....I am working on this now...I am getting a syntax errro...probably misspelled something...I am checking.

If all else fails, I will do as you suggest, compact repair...I don't see any missing references in VBA.

Thanks a bunch :)

Lucy
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you both Capricorn1, and Flyster...the report look great, problem solved...

SOOOOOOOOOOO thankful to both of you.


Lucy
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I believe the points should be split between myself and Capricorn1. He answered the second part of the question.

To Lucy: Thanks!
Flyster, I agree..I just don't know what or how to make sure the points are split between you two. Please let me know what I should do to make this happen.


Thanks,

Lucy
Sorry this took so long to resolve, you both were very helpful and together gave me the solution...which worked GREAT!

Thank you both very much,

Lucy