Get value from other field

ppsandy

New member
Local time
Today, 19:25
Joined
Oct 9, 2008
Messages
8
Dear All,

Kindly help me to do it.....

1. Cheque Amount
2. Actual Received Amount
3. Void (this is a check box and will click it when the cheque cannot present)

How can I set the "Actual Received Amount" value to "0" when the "Void" = "Yes"? Otherwise the value will same as "Cheque Amount".

PLEASE HELP HELP!!

Sandy
 
I would place the following in the AfterUpdate event

Private Sub void_AfterUpdate()
If Me.void = -1 Then
Me.ActualReceivedAmt = 0
Else
Me.ActualReceivedAmt = Me.ChequeAmt
End If
End Sub

The record will not change unitl you close it . open it up again to see the result.
I would also set the default value of the tick box to 0
There may well be otherways to acheive this if so you may get other suggestions

Best of Luck
 
Thank you very much!!

how about use "IIf"? I try this formula below but nothing display...anything wrong?

IIf[Void]="True",0,[ChequeAmount]

Pls. help again!!







I would place the following in the AfterUpdate event

Private Sub void_AfterUpdate()
If Me.void = -1 Then
Me.ActualReceivedAmt = 0
Else
Me.ActualReceivedAmt = Me.ChequeAmt
End If
End Sub

The record will not change unitl you close it . open it up again to see the result.
I would also set the default value of the tick box to 0
There may well be otherways to acheive this if so you may get other suggestions

Best of Luck
 
Last edited:
In my example I used my own field names so you would have had to change them to make it work.

As for the IIF Expresdion

You could try this: use the name of your filed for the "Actual Received ammount" not mine.

Me.ActualReceivedAmt = IIf(void - 1,0, 0)

NOTE -1 Means the box has been checked
 
Last edited:

Users who are viewing this thread

Back
Top Bottom