Calculation query help MS Access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • EORTIZ
    New Member
    • Sep 2007
    • 22

    Calculation query help MS Access

    This is an example of what I need to do:

    Data in an ACCESS table:

    CustomerID: AAA
    Pay_Month: Dec-2006
    Type:General
    Adjust_FromDate :N/a (for general payments, no adjustments)
    Adjust_EndDate: N/a
    Amount: 100
    Months:n/a
    Ratio:n/a

    CustomerID: AAA
    Pay_Month:Jan-2007
    Type: Adjustment
    Adjust_FromDate :12/1/2007
    Adjust_EndDate: 12/31/2007
    Amount:100
    Months:1 (number of months of adjustment period)
    Ratio: 100/1=100 (amount/months)

    CustomerID:AAA
    Pay_Month:March-2007
    Type:Adjustment
    Adjust_FromDate :12/1/2007
    Adjust_EndDate: 2/28/2007
    Amount:300
    Months:3
    Ratio:100

    Now, I need that the amount of adjustments be applied to the corresponding
    month. This is the output I need to get.

    CustomeriD:AAA
    Pay Month: Jan-2007
    General Payment:0
    Ajustment Payment:100 (Adjustment reported on march)

    Pay month:Feb-2007
    General Payment:0
    Adjustment Payment:100

    In case that a general lpayment be done in a particular month, the program
    needs to be able to sum the tow amounts to obtain a total amount (general +
    adjustment)
  • Scott Price
    Recognized Expert Top Contributor
    • Jul 2007
    • 1384

    #2
    Welcome to the Scripts, EORTIZ!

    Please remember to provide a meaningful title to your threads! I've changed it for you this time, but in the future please choose something a little more meaningful.

    I'll let some of our experts a little more versed in sql queries help you on the particulars of your problem.

    Regards,
    Scott

    Comment

    Working...