Results 1 to 2 of 2
  1. #1
    jfiresto is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Feb 2013
    Location
    California
    Posts
    7

    List Dates From Query By Real Calendar Date Not Alphabetized, Access 2010

    I am using a query to show dates and weights for a certain date range. I would like the information displayed in real calendar dates not alphabetized. The dates are stored in a date field (Date Property Processed) and the weight are stored in a numerical field (Total Property Weight Received). Also if the month contains no data, I would still like to show the month with "0" in the weight field. Attached is a copy of the query I am using right now. I really could use some help, thanks in advance.

    John



    SELECT DISTINCTROW Format$([Property Weight].[Date Property Processed],'mmmm yyyy') AS [Date Property Processed By Month], Sum([Property Weight].[Total Property Weight Received]) AS [Sum Of Total Property Weight Received]
    FROM [Property Weight]
    GROUP BY Format$([Property Weight].[Date Property Processed],'mmmm yyyy'), Year([Property Weight].[Date Property Processed])*12+DatePart('m',[Property Weight].[Date Property Processed])-1;

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    Include ORDER BY clause in the query:

    ORDER BY Format$([Property Weight].[Date Property Processed],'yyyymm')

    Sorry, can't show data that doesn't exist. If there is no weight data for particular month, meaning there is no record, then there is nothing for the query to retrieve.

    One way to show all yyyymm regardless if there is no weight data requires a 'master' data source of all possible yyyymm values, then join that source to the posted query, jointype 'Include all records from yyyymm table ..."
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Access 2010 Calendar Control
    By burrina in forum Forms
    Replies: 21
    Last Post: 05-20-2013, 04:50 AM
  2. Replies: 9
    Last Post: 05-07-2013, 08:37 PM
  3. Replies: 0
    Last Post: 07-31-2012, 12:25 PM
  4. Help with dates in Access 2010
    By Lars_a in forum Access
    Replies: 3
    Last Post: 04-18-2012, 07:00 PM
  5. Access 2010 Calendar
    By Cyrex in forum Programming
    Replies: 9
    Last Post: 10-02-2011, 07: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