P
Prufrock
I have got close to getting a running total working on a query and then
appearing as a subform in a form but the totalling is happening across
all records not the ones that should be selected from the main form.
I have a form and subform based on a query. When I select an ID number
a sub form shows me following fields:
[PaymentNumber] [ID][Date] [AmountDue] [AmountPaid] [AmountOwing]
[TotalOwing]
I have a calculated field in the query that takes AmountPaid from
AmountDue. Sometimes not all is paid. This gives me Amount Owing.
Now I have used a further calculated field in query that attempts a
running sum of the TotalOwing. I am getting totalling occuring but when
I get the information in the subform for a tenant by selecting them in
the main form it shows they have no AmountOwing but the TotalOwing is a
figure (as if it is totalling across all payment numbers and nor
specific to the tenantid. I have the form and subform linked by Tenant
ID.
My current expression is
TotalOwing:
Format(DSum("RentOwing","qryRentPayments","[PaymentNumber]<=" &
[PaymentNumber] & ""),"$0.00")
Can someone help me to ensure that when I select a tenant in main form
the records I see ( which I do) are only theirs and also the running
total (TotalOwing) matches their AmountOwing amounts? Thanks very much
appearing as a subform in a form but the totalling is happening across
all records not the ones that should be selected from the main form.
I have a form and subform based on a query. When I select an ID number
a sub form shows me following fields:
[PaymentNumber] [ID][Date] [AmountDue] [AmountPaid] [AmountOwing]
[TotalOwing]
I have a calculated field in the query that takes AmountPaid from
AmountDue. Sometimes not all is paid. This gives me Amount Owing.
Now I have used a further calculated field in query that attempts a
running sum of the TotalOwing. I am getting totalling occuring but when
I get the information in the subform for a tenant by selecting them in
the main form it shows they have no AmountOwing but the TotalOwing is a
figure (as if it is totalling across all payment numbers and nor
specific to the tenantid. I have the form and subform linked by Tenant
ID.
My current expression is
TotalOwing:
Format(DSum("RentOwing","qryRentPayments","[PaymentNumber]<=" &
[PaymentNumber] & ""),"$0.00")
Can someone help me to ensure that when I select a tenant in main form
the records I see ( which I do) are only theirs and also the running
total (TotalOwing) matches their AmountOwing amounts? Thanks very much