Results 1 to 2 of 2
  1. #1
    RachelBedi is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Jul 2012
    Posts
    67

    Help with grouping

    I need to write a query which takes the previous month's audits and groups them together by Week 1, Week 2 etc



    Here is the SQL I have for the AuditDate field;

    AuditDate: DatePart(w,(Between DateSerial(Year(Date()),Month(Date())-1,1) And DateSerial(Year(Date()),Month(Date()),0)

    However I'm getting a syntax error, I'm not even entirely sure that I'm handling this correctly.

    Could anyone offer some advice?

    Thank you!

  2. #2
    RachelBedi is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Jul 2012
    Posts
    67
    sooo I ended up working around this by adding in an additional column for the week number Week: (DatePart("ww",[AuditDate])) and grouped by that column - works

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

Similar Threads

  1. Grouping
    By greg2725d in forum Reports
    Replies: 7
    Last Post: 09-29-2011, 10:00 AM
  2. Grouping
    By EricF in forum Reports
    Replies: 5
    Last Post: 07-18-2011, 03:58 PM
  3. Grouping By Age
    By xnixiel in forum Queries
    Replies: 1
    Last Post: 07-01-2010, 09:14 AM
  4. Grouping strings
    By Fre in forum Access
    Replies: 16
    Last Post: 04-24-2010, 03:46 PM
  5. Grouping
    By dref in forum Reports
    Replies: 1
    Last Post: 01-16-2010, 08:30 AM

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