I spent hours last night trying to figure out why my Amount due on the Payment Form shows the negative of the Total Paid and finally saw what was happening but still dont know why. The Amount Due on the payments form is set to be equal to the balance remaining on the order form. when i add a payment on the payment form I can see that the balance remaining briefly flashes to the negative payment payments made and then shows the balance remaining. So the Amount Due on the payment form shows the negative payments made. I can close the payment form and open it and the amount due is correct. Do you know why this would be happening?
Shallena AyersOP
@Reply 13 months ago
here is a screenshot of what it looks like
Shallena AyersOP
@Reply 13 months ago
Shallena AyersOP
@Reply 13 months ago
=([Forms]![orderf]![orderdetailf].[Form]![sumlinetotal])-[TotalPmnts] That is the control source for the amount due field that is flashing the total payments as a negative then showing the correct calculation of the AmountDue
Shallena AyersOP
@Reply 13 months ago
this is the control source for the amount due on the payment form =[Forms]![OrderF]![AmountDue]
Sami Shamma
@Reply 13 months ago
Shallena if this field =([Forms]![orderf]![orderdetailf].[Form]![sumlinetotal]) value is Zero, the amount you will be negative.
Shallena AyersOP
@Reply 13 months ago
Right... but what is happening is lets say the original amount owed was $150. current balance owed is $100. and lets say i add a $10 payment. So the New balance owed would be $100 minus $10 = $90 owed. So on the Order Form the amount due quickly flashes the $minus $10 then shows the correct $90 owed. In the Payments form the balance owed is equal to the balanced owed on the order form which in this case should be $90. But it seems to be grabbing the minus $10 that flashes on the order form field instead of the $90. If i close and reopen the form then the payments amount still due shows correct. So I am not sure how to make the field in the payments form to wait until the order form finishes the calculation and grab the final result. I hope that makes sense.
Shallena AyersOP
@Reply 13 months ago
I decided instead of saying the AmountDue field in the Payments Form = AmountDue on Order Form i would instead grab the SumLineTotal value on the subform and calculate right on the payments form. I thought that fixed my issue because the numbers were all perfect. But only that one time. when i closed and reopened the form the SumLineTotal is now blank. this is my control source =[Forms]![OrderF]![OrderDetailF].[Form]![SumLineTotal] Why is that not working?? I am losing my mind lol
Shallena AyersOP
@Reply 13 months ago
Shallena AyersOP
@Reply 13 months ago
You can see at the top the calculated total paid and amount due fields on the Order Form. The control source code is in the current balance field that I guess should say Original Balance. It showed the balance the first time when I added the code and never again...
Donald Blackwell
@Reply 13 months ago
Is the "LineTotal" field on your OrderDetailF calculated in the table, a query, or in the form?
I've had issues where a calculated field in a form that gets its value from other fields calculated in that form won't show as having a value to other forms, if that makes any sense.
If this is the case, you might try making a query to create the calculated field LineTotal, then set the source of OrderDetailF to that query. This should eliminate some blank fields and some of the "flashing" of the values during calculations because a lot of them will have already calculated before the form is displayed.
Would need to see the actual design view (properties) of your forms (control source)/fields (row source) as well as any underlying queries to know for sure what is going on. Attempting to offer any suggestions without having that source information might just make things more confusing.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Developer 7.