Auto update Question

fenhow

Registered User.
Local time
Today, 14:25
Joined
Jul 21, 2004
Messages
599
Hi, I have a form with a sub-form. On my main form there is a calculated field called AmountPaid, it is a sum of the total payments in the subform.

On the main form I have a field called Current.

I am using the following code to update the Current Field when the AmountPaid is = to the Amount Due.

If [AmountPaid] = [PaymentAmountDue] Then
[PaymentCurrent] = "Yes"
Else
[PaymentCurrent] = "No"
End If


The issue is, no matter where I put this code it will not trigger the change. I tried On Change, After Update, On Dirty... Any help on how to make it happen?
Thanks.
Fen
 
You could try the form's On Current, but maybe before that create a command button and put the code in there just to make sure the code works. Another thing you could try is to substitute AmountPaid in the code with the expression you have in the control source.

If none of this gets you anywhere I suggest you upload your database or the portion with this problem and let us take a look.
 
The issue is, no matter where I put this code it will not trigger the change. I tried On Change, After Update, On Dirty... Any help on how to make it happen?

Were those events for the form, subform, or one or more of the fields? I would suggest having that in both the current event for the main form and the After Update event for the [Amount Paid] field on the subform (modifying field references accordingly) and see if that does the trick.
 

Users who are viewing this thread

Back
Top Bottom