Results 1 to 8 of 8
  1. #1
    Cowboys822 is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2017
    Posts
    4

    Queries to reports

    So i am having issues with one if my reports. All other reports are good except for this report. All other reports i have queries set up to pull data to generate a report. Example i have an expiration date from the qual date. I want to forcast who is expired, who is coming expired the current month, who is coming expired next month, 2 months out, 3 months out etc from the same report... all other reports i have does the similar for other training expirations. They are good since they are all yearly expirations. However, the one report i am having issues with has an expiration date of 8 motnhs instead of 12. If trading has been conducted before the 8th month the expiration date now goes a year from the qual date. My expression is a little complex because of what i want it to do. So i have seperate queries set up for expiration, current month, next month like the other reports those all pull the right dates from the database to the reports... so for the expired i have

    Expiration qry / Exp: DateDiff(“m”, 8 [Qual])
    Current month qry / Exp: DateDiff(“m”,7 [Qual])


    next motnh qry / Exp: DateDiff(“m”,6 [Qual])
    criteria i have for all is / Not is Null

  2. #2
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    You want DateAdd, not DateDiff.

  3. #3
    Cowboys822 is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2017
    Posts
    4
    Quote Originally Posted by aytee111 View Post
    You want DateAdd, not DateDiff.
    Yes I already did and the names come out but on the next month and current month etc. it shows the same people with different dates from the qual date...

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Is it possible to store the expiration date on the table?

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    It might be helpful to you and readers if you gave us a 4-5 line description of "what" your database/application is about - in simple plain English.

  6. #6
    Cowboys822 is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2017
    Posts
    4

    Xxx

    Duh..........
    Last edited by Cowboys822; 12-22-2017 at 02:42 PM. Reason: Because

  7. #7
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    So there are two types of expiration - proficiency, which expires on July 31st (7 months), and qualification which expires on December 31st (12 months). And the purpose of this is to create a report showing who will be expiring this month, next month,.....

    For each person
    - if their qual exp date is before today, then they have expired, ignore them
    - calculate the prof exp date - qual date + 7 (EOM)
    - if the prof exp date is before today and they have not done the prof test then they have expired, ignore them
    - if the prof exp date is before today and they have done the test, then exp date is qual date + 12 (EOM)
    - if the prof exp date is after today and they have already done the test, then exp date is qual date + 12 (EOM)
    - if the prof exp date is after today and they have not done the test, then exp date = prof exp date

    Is this what you are trying to get to?

  8. #8
    Cowboys822 is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2017
    Posts
    4
    Thanks for the reply back... so your first part is correct... we track over 300 people so I can’t ignore them. These reports shows the supervisors who are coming due.

    So the qualification date is the day they conduct weapon training. It expires the same month at the end of the next year. So if they fired today, they will expire 31 Dec 18. Now what is tricky about this if they have to conduct another training between five and seven months after the qual or they go expired until they take the training. We try to get them in between those dates so they can continue to arm up. Once that training is completed the original qual does not expire until 31 Dec 18.

    So I have dates I input onto my form:

    Qual date once I enter the qual date it gives me the training due date. In this case would be 31 Jul 18. Now if the training is conducted say 15 Jul. that training date now turns to 31 Dec 18 since he completed the training. All that works perfectly. It also reflects perfectly on the main report I have. However, I created A new report to forecast who is coming due during the current month, next month, 2 months out etc. this forecast to the supervisors so they can get them into training.

    I have three other reports for different training like I just explained and they work fine. This one is giving me the issue due to the complexity of the expression. Hope this explains it a little better...

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

Similar Threads

  1. reports vs queries?
    By RLehrbass in forum Access
    Replies: 4
    Last Post: 08-03-2015, 07:22 PM
  2. Multiple Queries and Reports
    By Chad E in forum Access
    Replies: 4
    Last Post: 10-18-2011, 01:47 PM
  3. reports to forms to queries
    By aaa1 in forum Forms
    Replies: 9
    Last Post: 08-10-2011, 07:29 PM
  4. Parameter Queries & Reports
    By Nixx1401 in forum Reports
    Replies: 6
    Last Post: 05-07-2011, 08:09 PM
  5. Reports based on queries
    By Merkava in forum Reports
    Replies: 13
    Last Post: 12-14-2009, 11:21 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