Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Kendrick, Idaho, USA
    Posts
    277
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Group on odd dates (Access 2000)

    In a report, I would like to be able to group events by specified dates. I can group by months or by quarters. Can I <img src=/S/crossfingers.gif border=0 alt=crossfingers width=17 height=16> group events that fall between the first and the 15th of the month and the following group would be events on the 16th through the end of the month? Perhaps paydays are second and fourth Fridays and I want to use those days as group headers. Are these things possible?

    Thanks.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Group on odd dates (Access 2000)

    You would do it by creating a calculated field in the underlying query and using that to return an arbitrary value (i.e., if the day of the date is between 1 and 15, return a 1 and if it's > 15 return a 2). Then group first by month and then by the calculated field.
    Charlotte

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Group on odd dates (Access 2000)

    <P ID="edit" class=small>Edited by HansV on 08-Aug-02 10:50.</P>I have attached a zipped Access 97 database that demonstrates how to group on half months (Charlotte explained how to do this) and to display the second/fourth Friday in the month in the group header.

    The database contains a module with a custom function get the n-th mmm-day in the month. This custom function is used both in a sample query and in a sample report.

    Edited by HansV because the use of three times the 24th letter of the alphabet caused a mail server to bounce the digest.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •