One field chaning value dependent on another field value

PeterM

New member
Local time
Yesterday, 22:05
Joined
Nov 7, 2008
Messages
6
I have a form.

The two fields are [Payment] (a Yes/No tickbox) and [Amount Outstanding] (A currency value).

I want Amount Outstanding to change to £0.00 once the uer has selected the Payment tickbox...how would I go about achieving this?

The Amount Outstanding Text box in form design view already has a code = [Total Price] in it as it needs to display this value.

Could anyone suggest a code that could fix the problem?

Cheers
 
AfterUpdate on the chkbox should do this.

Code:
Private Sub Payment_AfterUpdate()
Me.Amount_Outstanding = 0
End Sub

But I think the =[Total Price] would mess it up somewhere.
 
Last edited:
I have a form.

The two fields are [Payment] (a Yes/No tickbox) and [Amount Outstanding] (A currency value).

I want Amount Outstanding to change to £0.00 once the uer has selected the Payment tickbox...how would I go about achieving this?

The Amount Outstanding Text box in form design view already has a code = [Total Price] in it as it needs to display this value.

Could anyone suggest a code that could fix the problem?

Cheers

It sounds like you would be able to change the [Amount Outstanding] Text Box Formula to use an IIF statement that checks the value of [Payment], and sets [Amount Outstanding] to 0 if [Payment] is marked Paid and to [Total Price] if [Payment] is marked Not Paid
 
Not sure But it seems like yopu are trying to use the [Amount Outstanding] to display what they owe and what they are paying. Would be easier to have a another field [Amount paid]. If theuser selects payment you would subtract the [Amount paid ] from the [Amount Outstanding] field. Giving them the new balance. Unless They can only pay the whole amount.
 

Users who are viewing this thread

Back
Top Bottom