Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jul 2003
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query Question (2000)

    I have two fields in a table. One is a date in the form 1/1/03, and one is a Yes/No field. I want to create a query that will tell me how many of the entries in one month (say January) have a corresponding Yes in the second field. In other words, how many of the entries that begin with a "1" in the date field are "Yes" in the "Yes/No" field. Any ideas? Thanks in advance for any help.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Query Question (2000)

    Create a query based on the table. Make it into a Totals query by selecting View | Totals.
    Add the date field, and change Group By to Where.
    Enter the following condition in the Criteria: line under this field:

    Between #1/1/03# And #1/31/03#

    Add the yes/no field, and change Group By to Where.
    Enter Yes in the Criteria: line under this field.
    Enter any field in the third column (it may be the date field or the yes/no field, or another field), and change Group By to Count.

  3. #3
    New Lounger
    Join Date
    Jul 2003
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query Question (2000)

    I did all of that and it doesn't work...it says the Count is 0 in the query result when it's not.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Query Question (2000)

    Could you post a screen shot of the query in design view? Make the columns in the grid in the lower part of the window wide enough to see the entire contents.

    Or, if you are willing to let Loungers examine a stripped down version of your database:
    <UL><LI>Make a copy of the database and work with that.
    <LI>Remove all database objects (tables, queries, forms, reports, macros and modules) that are not relevant to the problem.
    <LI>In the remaining table(s), remove most records - leave only the minimum number necessary to demonstrate the problem.
    <LI>Remove or modify data of a confidential nature.
    <LI>Do a compact and repair (Tools/Database Utilities).
    <LI>Make a zip file containing the database; it should be below 100KB.
    <LI>Attach the zip file to a reply.[/list]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •