Update field value based on another field

gconeuk

Registered User.
Local time
Today, 06:19
Joined
Mar 3, 2015
Messages
16
Hi,

Can you help?

I have the following fields in an A2010 form

PaymentMethod
Total
InstalmentAmounts
OurFee

InstalmentAmounts field is populated based on the results of PaymentMethod which is a combo box

Here is the current code

Code:
 Select Case Me.Payment_Method.Value
    Case "Three post dated Cheques"
    'If three payments by cheque
    Me.InstalmentAmounts.Value = Round(Me.Total.Value / 3, 2)

In some cases there will be a few pennies that the client "overpays" because the instalment amounts will not add up to the Total. I need to add up the TotalInstalmentPayments to find out what the client actually pays and then add the difference between TotalInstalmentPayments and Total to the OurFee field

So

Total = 500.00
Payment Method = 3 instalments so
IstalmentAmounts = 166.67 (rounded) so client pays 500.01 so the 0.01 needs to add to the OurFee field.

Help me please! :banghead:

Many thanks :)
 
I don't understand. Is this just a simple math problem? Here's the formula I would use:

OurFee = PaymentMethod * IstalmentAmounts - Total

Am I oversimplifying it or are you overthinking it?
 
Hi thanks for replying.

Sorry I should have explained, i also need to take into account that OurFee may already be filled. So in the explaination below

Total 500.00 which was been calculated by adding up other fields including OurFee lets say ourfee is 50.00 but once the PaymentMethod is selected say this is three instalments, the 500.00 has to be divided by 3 (got that in the code below) but there's an overhang of 1p so the client actually pays 500.01 and I want that 1p to be added to OurFee automatically making the OurFee field 50.01.

Any ideas?

Many thanks
 
Any ideas?

No offense buy my previous code is 99.9% of the way there. You should be able to adapt it to suit your needs.
 
Argh sorry, total brain freeze! You're absolutely correct, it needed an extra pair of eyes. thanks :)
 

Users who are viewing this thread

Back
Top Bottom