Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Feb 2003
    Location
    Northfield, Minnesota, USA
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query Question (Access 2000)

    Query Question

    I want to create a report based on a query that counts up how many visits occurred to our Writing Help Center.

    Do I need to write a query for each time frame or can I write one query that would prompt for both the first and second semesters start and end dates and then count up for each time period?

    The table called Wpnotes has a field called inputdate.
    I asked for a count of inputdate
    I tried this in criteria for each:
    Between [Enter Start of Sem 1] And [Enter end of Sem 1]
    And
    Between [Enter Start of Sem 2] And [Enter end of Sem 2]

    Access prompts me for the start and end dates of each semester and then give me this error.

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Query Question (Access 2000)

    The simplest way to do this is with two queries. Do the first query (using the query grid) to select the records you want with the Between statements and then build a second query using the results from the first to do the counts you want. You may also need to separate out the two semesters, or do some logic to provide a semester number that you can GROUP By.
    Wendell

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Query Question (Access 2000)

    Take a look at the Partition function and see if it would help you group your data into ranges. You can do a search on this forum to find several threads that discuss the user of Partition() in queries, including <post#=169142>post 169142</post#>, which contains a simple example.
    Charlotte

  4. #4
    New Lounger
    Join Date
    Feb 2003
    Location
    Northfield, Minnesota, USA
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query Question (Access 2000)

    Thank you I appreciate all of your help.
    Al

Posting Permissions

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