If Statement Help

coolcatkelso

Registered User.
Local time
Today, 20:23
Joined
Jan 5, 2009
Messages
279
Hiya guys

I have on my form the following -

Outstanding Balance (Currency)
Account Settled (Yes/No)

How would I do an IF statement or something that would automatically place a tick in the Account Settled?

Basically, If the Outstanding Balance is ?0.00 then (YES) Account Settled.. And if outstanding Balance is ?0.01 + then (NO) account Settled?

Cheers
________
Digital Vaporizers
 
Last edited:
In the After Update event of your Outstanding Balance field try;
Code:
If Me.OutstandingBalance.Value = 0 Then
     Me.AccountSettled.Value = -1
End If
 
Hiya John

I tried that code but nothing changed
________
MFLB
 
Last edited:
More of a business rule but what is required if Outstanding Balance is negative?
 
Also, why have the Settled field at all? Since its value is determined by the balance field, you can simply test that instead.
 
If the outstanding balance = $500.00 and your company receives a cheque for $5000.00 (typo on cheque) does your company feel that the account has been settled and keep the change?

Before starting to write code it is reasonable to define the terms under which the code will run.
 
Hmmm I see you point

Don't really need the settle option at all. As for the account in Negative, I hadnt thought of that either, however, at the end of the month when the reports would be printed, this would show up on the account.. Or do you have something else in mind, as in Fail safe?
________
Avandia Class Action
 
Last edited:
The original question was about Forms now it’s about Reports.

For Reports, I would tend to go for conditional formatting using Red, Black and Green.
If the Report is printed in black/white I would draw an ellipse around the differences between outstanding balance and zero.
If I didn’t know if it was going to be a colour or black/white report I would do both.
 

Users who are viewing this thread

Back
Top Bottom