Results 1 to 6 of 6
  1. #1
    Lasitha is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Jun 2014
    Posts
    3

    Unhappy Calculate the duration specific value continue from

    Please let me know how to get the "Debts Continue from" value in a Access Query
    I only need to get the answer the name of the month or count of Months Debts finally continue from.



    Supplier No Name April May June July Debts Continue from
    1 Alan -50 0 0 -1000 July or 1
    2 John -100 -105 -115 -120 April or 4
    3 Perera -15 0 -20 -25 June or 2

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    What do you mean by Continue from? Are these dates hard coded? Do you want to get the Debts from a certain date or month? Please explain better.

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You want to know the first month with amount less than 0 following a month that is 0?

    This is not a normalized data structure. Does your table actually have a field for each month? If so, then this will need a custom VBA function or a series of queries. The first query would be UNION to rearrange the data into normalized structure.
    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.

  4. #4
    Lasitha is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Jun 2014
    Posts
    3
    Quote Originally Posted by burrina View Post
    What do you mean by Continue from? Are these dates hard coded? Do you want to get the Debts from a certain date or month? Please explain better.
    Thanks burrina,
    This is just a query, In this query debts have mentioned under each month for each suppliers.
    As the 3rd instance Suppplier No 3, his debts is over(he settle his debts amount) on May and again started on June. now he continue his debts amount for 2 months (June & July). So I need to get result as "2"

    I query this chart from another related tables. Primary key is Supplier number.

  5. #5
    Lasitha is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Jun 2014
    Posts
    3
    Quote Originally Posted by June7 View Post
    You want to know the first month with amount less than 0 following a month that is 0?

    This is not a normalized data structure. Does your table actually have a field for each month? If so, then this will need a custom VBA function or a series of queries. The first query would be UNION to rearrange the data into normalized structure.
    Dear June7
    I'm very beginner to access. Normalizing and analyzing are not much familiar to me. If u feel free please direct me to good web site where I can study Database programming with access from beginning & sorry for disturbances.

    In this case, I query this from another related tables with primary key of "Suppler No."
    In this query Debts amount has mentioned under each month. If there is a "0" value mean that the supplier has settled the debts amount. Actually my boss ask me to find the duration the debts continue.

    As the 3rd sample (Supplier No 3) he settled to debts on Month of May. But again start on June and continue it to present. So I need to count that duration in "Debts continue from" column. Thank you

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Lots of tutorials on web and lots of books. But start with http://www.rogersaccesslibrary.com/

    If what you posted is the result of a query, then show sample of raw data.
    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. Save/Continue Is what I want???
    By Z1nkstar in forum Access
    Replies: 15
    Last Post: 06-20-2014, 12:52 PM
  2. Using VB to calculate a specific date
    By barryg80 in forum Programming
    Replies: 8
    Last Post: 12-05-2013, 09:05 AM
  3. Calculate duration between two dates
    By Tommy1005 in forum Queries
    Replies: 3
    Last Post: 07-02-2012, 05:41 AM
  4. Replies: 1
    Last Post: 11-12-2010, 01:16 AM
  5. How to calculate duration in hours & minutes
    By joypanattil in forum Access
    Replies: 0
    Last Post: 11-25-2009, 04:49 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