Results 1 to 7 of 7
  1. #1
    dccjr's Avatar
    dccjr is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2012
    Location
    Colorado Springs, CO
    Posts
    138

    Parse Data by Month

    I am wondering if there is an easy way to parse data from a table base on month, then count the records for each month. I will use this to create a trend chart. Any suggestions?

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    To respond with a valid answer, we will need to understand the structure and makeup of the table. It certainly is possible to do what you want, but without details of your db, no further information can be expressed. We would only be guessing at a solution.

  3. #3
    lugnutmonkey is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2013
    Posts
    42
    I have done something similar, I used a totals query and on the field which contained the date(in my case it was called [Date/Time]) I used the expression

    Code:
    Months: MonthName(Month([Date/Time]),0)
    I hope this helps

  4. #4
    dccjr's Avatar
    dccjr is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2012
    Location
    Colorado Springs, CO
    Posts
    138
    I am generating a report based on a given date to present. The user will select a date (date picker on a text box). I then need to count all of the records that have a DefectDate from (and including) that date to the present. I dont actually need the records, just a count for each category/group as selected in a previous combo box. For example, the user may decide to run this report using the Category field. I need to count the number oif records in each category and use that information in a bar chart.

  5. #5
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    In a query drag your date field to the grid twice. In the criteria for the first column with the date type
    >= Forms!yourformName.yourcomboboxName

    click on the Sigma in the ribbon to change the query from a select query to an aggregate query. In the second column holding the Date field, change the Group by to Count.

    Run the query but because you are referencing a form for the criteria, make sure the form is also open or the query will fail.

  6. #6
    dccjr's Avatar
    dccjr is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2012
    Location
    Colorado Springs, CO
    Posts
    138
    Sadly, I have never used the query builder in Access. I prefer to write the SQL in VBA. Can you give an example of how this would be done?

  7. #7
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    If you look at this page, there are several videos on Queries, all using the QBE.

    http://www.datapigtechnologies.com/AccessMain.htm

    Alan

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

Similar Threads

  1. Replies: 4
    Last Post: 07-09-2012, 01:49 PM
  2. Display data from month x-1 and x-2
    By donodarazao in forum Reports
    Replies: 5
    Last Post: 11-06-2010, 12:57 PM
  3. Tracking End of Month Data
    By spherearrow in forum Database Design
    Replies: 5
    Last Post: 09-13-2010, 10:55 AM
  4. Replies: 7
    Last Post: 07-19-2010, 08:55 AM
  5. Parse a File from a Directory and write data to table
    By galahad in forum Database Design
    Replies: 0
    Last Post: 04-23-2009, 08:38 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