Results 1 to 5 of 5
  1. #1
    TroxlSha is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    19

    Conditional Reports Help

    I have a table with a [date/time stamp]as the key and eight [readings] fields. The data if linked to a .csv file coming from equipment that takes readings every 15 mins, but I need to create a report for the state that takes each day for a given month and shows only the highest [readings] for each 4 hour period.

    How do I get a report to sort through the data for specific date/time frames, and display the highest value for these 4 hour blocks?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Do you want the 4-hour periods to overlap (1-5, 2-6, 3-7, etc) or separate (8-12, 12-4, 4-8, 8-12, 12-4, 4-8)?
    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.

  3. #3
    TroxlSha is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    19
    Sorry, I thought I replied to this already but I guess it didn't work... Anyway, no the time periods would not overlap they would be 0000-0400, 0401-0800, 0801-1200, etc...

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Create fields in query that will extract the date and time components:

    Format(datefield, "Short Time")
    Format(datefield, "Short Date") or Int(datefield)

    Use the timepart field to calculate a period ID for each record. This could be a long, complicated expression and might exceed length limit. Roughly, something like:

    IIf(timepart Between "00:00" And "04:00", 1, IIf(timepart Between "04:01" And "08:00", 2, etc)

    or

    Switch(timepart Between "00:00" And "04:00", 1, timepart Between "04:01" And "08:00", 2, etc)

    Might want to build a custom function and call that function from query.

    Use that timeperiod field along with the datepart field to group records in an aggregate (totals) query to return the Max reading for each period of each date.
    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.

  5. #5
    TroxlSha is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    19
    Thank you so much for the quick reply, I will give this a shot when I get a free moment and let you know how it worked.

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

Similar Threads

  1. Convert Client Reports to Web Reports
    By need_help12 in forum Reports
    Replies: 0
    Last Post: 05-08-2012, 08:22 AM
  2. Conditional formatting on reports
    By JenEveAle in forum Reports
    Replies: 2
    Last Post: 12-20-2011, 10:53 PM
  3. Conditional Visiablity
    By jlclark4 in forum Forms
    Replies: 5
    Last Post: 03-28-2011, 10:30 AM
  4. Reports w/ sub-reports very slow to open
    By vaikz in forum Reports
    Replies: 2
    Last Post: 02-27-2011, 08:41 AM
  5. Access Reports drop sub-reports
    By Kevin Ellis in forum Reports
    Replies: 0
    Last Post: 11-19-2010, 03:28 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