Results 1 to 7 of 7
  1. #1
    Lauren1989 is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2011
    Posts
    10

    Dates and Queries (its hard to describe!)

    I'm hoping someone can help me out. I'm stuck.

    Clients get reviewed on an annual, semi-annual, or quarterly basis. I am going to add two fields to my table: Date of Last Review (containing month/year) and Review Frequency (dropdown of 3, 6, 12 for quarterly, semi-annual, and annual). This is so I can run a query for each month and see what accounts need to be done. So far so good. Here's where I'm stuck. How do I then build a query so that:

    Quarterlies show on query every 3 months
    Semi-Annuals show on query every 6 months
    Annuals show on query once a year



    ...all based on Date of Last Review. Therefore an account with a Date of Last Review of March 2010 and a frequency of 12 will show on query for March and an account with a Date of Last Review of March 2010 and a frequency of 3 will show on queries for March, June, September, and December.

    PS- The year part in Date of Last Review can go if need be. The month is really what's important.

    Thanks for any help.

  2. #2
    ketbdnetbp is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Midwest
    Posts
    254

    You could try something like this...

    Quote Originally Posted by Lauren1989 View Post
    I'm hoping someone can help me out. I'm stuck.

    Clients get reviewed on an annual, semi-annual, or quarterly basis. I am going to add two fields to my table: Date of Last Review (containing month/year) and Review Frequency (dropdown of 3, 6, 12 for quarterly, semi-annual, and annual). This is so I can run a query for each month and see what accounts need to be done. So far so good. Here's where I'm stuck. How do I then build a query so that:

    Quarterlies show on query every 3 months
    Semi-Annuals show on query every 6 months
    Annuals show on query once a year

    ...all based on Date of Last Review. Therefore an account with a Date of Last Review of March 2010 and a frequency of 12 will show on query for March and an account with a Date of Last Review of March 2010 and a frequency of 3 will show on queries for March, June, September, and December.

    PS- The year part in Date of Last Review can go if need be. The month is really what's important.

    Thanks for any help.
    First, it might be better to have the Date of Last Review as a short date. You'll see why from the attachment.

    There are two queries, the first is based on the table. The second on the first query. The second is a Parameter Query, see [Which Month ?] and [Which Year ?] in the criteria areas. So, anytime you run the query, you would be prompted for the month and year. Enter a numeric value in both and the query will return those clients in need of a review for the month and year specified.

    Hope this helps...

  3. #3
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    See if this (attached MDB) is what you want. There is a table and a query.

    The field "LastReview" is type Date/Time. I would put the last review date in as the first of the month, although you could put the actual review date. The query works the same.

  4. #4
    Lauren1989 is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2011
    Posts
    10
    Thank you both so much for your help! I really appreciate the attachments. That was very helpful. I can definitely do this now thanks to you.

  5. #5
    Lauren1989 is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2011
    Posts
    10
    Quote Originally Posted by ketbdnetbp View Post
    First, it might be better to have the Date of Last Review as a short date. You'll see why from the attachment.

    There are two queries, the first is based on the table. The second on the first query. The second is a Parameter Query, see [Which Month ?] and [Which Year ?] in the criteria areas. So, anytime you run the query, you would be prompted for the month and year. Enter a numeric value in both and the query will return those clients in need of a review for the month and year specified.

    Hope this helps...

    Here is what I did, not sure why it's getting those error messages:

  6. #6
    ketbdnetbp is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Midwest
    Posts
    254

    Lauren1989

    See attached.

    As a rule you should avoid using spaces in field names.

    Secondly, when you added the AcctReview field with a yes/no data type, you referred to it using "Yes", it should be -1.

    Give the attached a try and let me know how it works out for you.

    All the best !!!

  7. #7
    Lauren1989 is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2011
    Posts
    10
    Worked like a charm. I was able to integrate it perfectly into (a backup copy!) of our current database. Thank you again for your help.

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

Similar Threads

  1. Printing hard copies
    By Sarge, USMC in forum Forms
    Replies: 1
    Last Post: 02-05-2011, 11:46 AM
  2. Subform Dialog Box Hard to Access
    By TrudyD1474 in forum Forms
    Replies: 1
    Last Post: 06-11-2010, 09:45 AM
  3. Handling dates in queries
    By mrk68 in forum Access
    Replies: 4
    Last Post: 03-23-2009, 06:35 AM
  4. Hard Returns v. Squares
    By Goodge12 in forum Queries
    Replies: 3
    Last Post: 01-28-2009, 10:10 AM
  5. Simple but hard question
    By andymok in forum Reports
    Replies: 1
    Last Post: 09-20-2007, 09:19 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