Hi All
I have a question regardin and access application i am helping to build. I have a subform with a number of text fields in the details section as follows:
Date Paid - Bound to field in payment table
Weeks Elapsed - shown as result of calculation (works fine)
Fee Due - shown as result of calculation (works fine)
Discount Given - Bound to field in payment table
Fee Due Less discount - shown as result of calculation (works fine)
Amount Due To Date - shown as result of calculation (works fine)
Amount Paid - Bound to field in payment table
Total Paid To Date - Bound to field in payment table
Balance - shown as result of calculation (works fine)
The problem i am having is with the [Total Paid To Date] field. I'd like to populate this with an updated total of the amount paid so far over a number of payments.
Also on the subform i have a field [Total Amount Paid]. This is a sum of all entries in the {Amount paid] field. At present there is a macro that is run which refreshes [Total Amount Paid] and then tries to set the [Total Paid To Date] field.
The setValue command in the Macro is set to this:
Item: [Forms]![Student]![Student on Courses subform]![Payment subform]![Total Paid to Date]
Expression: [Forms]![Payment subform]![Total Amount Paid]
I was hoping that this should assign the latest value of the [Total Amount Paid] to the latest [Total Paid To Date] in the details section. It doesn't however do that. When i change the expression to just a number it sets it no problem at all.
Hope this makes some sense.
Does anyone out there have any ideas how this could be done?
Thanks in advance.
I have a question regardin and access application i am helping to build. I have a subform with a number of text fields in the details section as follows:
Date Paid - Bound to field in payment table
Weeks Elapsed - shown as result of calculation (works fine)
Fee Due - shown as result of calculation (works fine)
Discount Given - Bound to field in payment table
Fee Due Less discount - shown as result of calculation (works fine)
Amount Due To Date - shown as result of calculation (works fine)
Amount Paid - Bound to field in payment table
Total Paid To Date - Bound to field in payment table
Balance - shown as result of calculation (works fine)
The problem i am having is with the [Total Paid To Date] field. I'd like to populate this with an updated total of the amount paid so far over a number of payments.
Also on the subform i have a field [Total Amount Paid]. This is a sum of all entries in the {Amount paid] field. At present there is a macro that is run which refreshes [Total Amount Paid] and then tries to set the [Total Paid To Date] field.
The setValue command in the Macro is set to this:
Item: [Forms]![Student]![Student on Courses subform]![Payment subform]![Total Paid to Date]
Expression: [Forms]![Payment subform]![Total Amount Paid]
I was hoping that this should assign the latest value of the [Total Amount Paid] to the latest [Total Paid To Date] in the details section. It doesn't however do that. When i change the expression to just a number it sets it no problem at all.
Hope this makes some sense.
Does anyone out there have any ideas how this could be done?
Thanks in advance.