Results 1 to 2 of 2
  1. #1
    Lorlai is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    107

    Compare records if not in this month, then use business process

    I am not sure how to properly phrase this question, and as such cannot find any answers out there on google. I have a budget that I am using to run several reports. We have a business requirement that states any expense purchased in this month for the next month (say you buy a plane ticket that will fly in January, but you bought the ticket in December) will not be counted. I have a column [Period] that contains the budget date (the final day of the month), and I have a column for [Actual Usage Date] that I can use to compare the dates. However, I am not sure how to set a rule for them...

    Period Item Type Actual Usage Use Business Process
    7/31/2012 Air 8/15/2012 Yes
    7/31/2012 rental 7/11/2012 No
    7/31/2012 rental 8/01/2012 Yes
    7/31/2012 Air 7/16/2012 No


    In the above example, the 1st row contains a plane ticket purchased in July, but not used until August. The business process should be used. The Rental was purchased in July and used in July, so does not need a business process.



    Is there a way in access to compare this information?

    Thank you for your help!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    You want to retrieve records where the month/year of Period and Actual are same?

    SELECT * FROM tablename WHERE Format([Period],"mmyyyy") = Format([Actual Usage],"mmyyyy")
    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.

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

Similar Threads

  1. Show access records as a business card
    By omair1051992 in forum Access
    Replies: 1
    Last Post: 06-28-2012, 07:50 PM
  2. Replies: 7
    Last Post: 05-10-2012, 01:02 PM
  3. Replies: 1
    Last Post: 11-28-2011, 12:39 PM
  4. First week or business day of the month
    By Dutch1956 in forum Programming
    Replies: 12
    Last Post: 09-18-2011, 08:39 AM
  5. Compare records in 2 tables
    By RalphJ in forum Access
    Replies: 13
    Last Post: 03-06-2011, 07:43 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