Results 1 to 2 of 2
  1. #1
    Lynnemcc87 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2014
    Posts
    6

    Query Help! Need to sort the number of records in each department between a certain date

    Hi! As mentioned in the title, I need help with a query. Here's the info.



    I have a database set up and one of my columns is 'Department'...i need to find out how many people are in each department but between a certain date. So basically I've started a query as seen in the image attached (1) and when i run it, it comes up with the information I want (2) but it doesnt have the date sorted. So when I add in the date in the query (3) it comes back listing them separately when I run it (4).

    1.
    Click image for larger version. 

Name:	1.JPG 
Views:	6 
Size:	20.4 KB 
ID:	25624

    2.
    Click image for larger version. 

Name:	2.JPG 
Views:	5 
Size:	16.6 KB 
ID:	25625

    3.
    Click image for larger version. 

Name:	3.JPG 
Views:	5 
Size:	26.9 KB 
ID:	25626

    4.
    Click image for larger version. 

Name:	4.JPG 
Views:	5 
Size:	19.1 KB 
ID:	25627

    I hope I have given enough info. I just want it to say - Business department, 2 records (but only showing records only after the 1st July 2016). On my first attempt without a date field, it was showing the number in each department in total....over the period of the last year!

    Thanks in advance!

    Lynne

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    change the 'group by' on your date column to 'where'

    Also note that date is a reserved word - (it means today) so using is as a field name will cause you problems at some point in the future

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Sort records by date added
    By gmaster in forum Programming
    Replies: 8
    Last Post: 06-12-2014, 01:21 AM
  2. Replies: 10
    Last Post: 05-09-2014, 10:54 AM
  3. Replies: 8
    Last Post: 09-10-2013, 05:32 PM
  4. Sort Records Via Date (Newest first)
    By tweety in forum Forms
    Replies: 4
    Last Post: 01-28-2013, 09:23 AM
  5. Replies: 3
    Last Post: 04-19-2011, 06:41 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