Page 1 of 2 12 LastLast
Results 1 to 15 of 29
  1. #1
    mrwistles is offline Novice
    Windows Vista Access 2003
    Join Date
    Aug 2010
    Posts
    18

    Simple query to show when items are not checked?

    Afternoon all,

    Having a total nightmare I run a tiny company and the only person with any access xp has just left.



    I need a very simple query.

    I have a database which has my three staff members and a list of their daily tasks. It then has a check box which they tick when they have completed it.

    What I want is a query which will ask me for the date I want to look at and then show me all of the items which have not been set to "No".

    I know this is incredibly easy but I am stuck.

    Thanks for your help.

  2. #2
    mrwistles is offline Novice
    Windows Vista Access 2003
    Join Date
    Aug 2010
    Posts
    18
    I can do the parameter query part which asks for the date.

    I am just unsure of the syntax to use when asking it to return only items which are unchecked.

  3. #3
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    can you get those items which are checked? please show us your query.

  4. #4
    mrwistles is offline Novice
    Windows Vista Access 2003
    Join Date
    Aug 2010
    Posts
    18
    Hi weekend,

    So I have a table with the fields Task 1-9 and the date. The users are to check the box once completed.

    In the query I have every field with a parameter query - "[Please enter the date required]" in the date field. I am unsrure of the syntax to use to return only items which have not been checked.

  5. #5
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    I don't know your field name for the checkbox, assume it's "checkfield",
    then you can put "NO" in criteria of the field "CheckField" to get all the unchecked items

  6. #6
    mrwistles is offline Novice
    Windows Vista Access 2003
    Join Date
    Aug 2010
    Posts
    18
    Quote Originally Posted by weekend00 View Post
    I don't know your field name for the checkbox, assume it's "checkfield",
    then you can put "NO" in criteria of the field "CheckField" to get all the unchecked items
    Thanks for the reply.

    My field names are Task 1, Task 2 etc...

    If I put "No" in the criteria in the query once run it returns all items as unchecked even though in the table only three are uncheked.

  7. #7
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    I need to check the code in your query. better with fieldname and type of your table.

  8. #8
    mrwistles is offline Novice
    Windows Vista Access 2003
    Join Date
    Aug 2010
    Posts
    18
    Quote Originally Posted by weekend00 View Post
    I need to check the code in your query. better with fieldname and type of your table.
    I don't have any code. I created it using the wizard.

    All I want to show is where field names 1-9 are unchecked for a specific date. I have entered "[Please enter the required date]" in the date field.

    All of the field names have a data type of Yes/No apart from the date.

  9. #9
    mrwistles is offline Novice
    Windows Vista Access 2003
    Join Date
    Aug 2010
    Posts
    18
    Sorry worked out how to get the code: -

    SELECT tbl_Chris.[Task 1], tbl_Chris.[Task 2], tbl_Chris.[Task 3], tbl_Chris.[Task 4], tbl_Chris.[Task 5], tbl_Chris.[Task 6], tbl_Chris.[Task 7], tbl_Chris.[Task 8], tbl_Chris.[Task 9], tbl_Chris.Date
    FROM tbl_Chris
    WHERE (((tbl_Chris.[Task 1])=No) AND ((tbl_Chris.[Task 2])=No) AND ((tbl_Chris.[Task 3])=No) AND ((tbl_Chris.[Task 4])=No) AND ((tbl_Chris.[Task 5])=No) AND ((tbl_Chris.[Task 6])=No) AND ((tbl_Chris.[Task 7])=No) AND ((tbl_Chris.[Task 8])=No) AND ((tbl_Chris.[Task 9])=No) AND ((tbl_Chris.Date)=[Please enter required date]));

  10. #10
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    if you don't mind, please upload you database here, in .zip file.

  11. #11
    mrwistles is offline Novice
    Windows Vista Access 2003
    Join Date
    Aug 2010
    Posts
    18
    I can't do that as my filewall will not let me. I will create an identical one when I get home and put it on here.

    It only has 1 table with 9 fields (the 9 listed above). All of the fields are Yes/No

    All I want is a query to show the items which are still set to no (unchecked)

    Thanks a lot for your help it is really appreciated.

  12. #12
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    Your query should return the items with all 9 fields are unchecked( not as you said all items), if any one field is checked, the item won't show in your query. is this what you expect?
    or you want items with any one of 9 fields is unchecked?



    Quote Originally Posted by mrwistles View Post
    Thanks for the reply.

    My field names are Task 1, Task 2 etc...

    If I put "No" in the criteria in the query once run it returns all items as unchecked even though in the table only three are uncheked.

  13. #13
    mrwistles is offline Novice
    Windows Vista Access 2003
    Join Date
    Aug 2010
    Posts
    18
    Quote Originally Posted by weekend00 View Post
    Your query should return the items with all 9 fields are unchecked( not as you said all items), if any one field is checked, the item won't show in your query. is this what you expect?
    or you want items with any one of 9 fields is unchecked?
    So in the table for 02/09/10 all but three items are checked.

    When I run the query it returns all items as unchecked.

  14. #14
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    I could not find any problem with you query,

  15. #15
    mrwistles is offline Novice
    Windows Vista Access 2003
    Join Date
    Aug 2010
    Posts
    18
    I will load the database up when I get home.

    Thanks weekend.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. need help with this simple query
    By dada in forum Programming
    Replies: 3
    Last Post: 08-20-2010, 07:08 AM
  2. Query Not Listing All Items
    By Rawb in forum Queries
    Replies: 7
    Last Post: 05-14-2010, 08:00 AM
  3. Query, show top 10
    By lostinspace in forum Queries
    Replies: 4
    Last Post: 05-10-2010, 12:18 PM
  4. Need Help with a very simple query
    By bikerguy06 in forum Queries
    Replies: 3
    Last Post: 06-08-2009, 08:43 PM
  5. Help with a simple query
    By JohnnyO in forum Queries
    Replies: 1
    Last Post: 02-11-2009, 09:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums