A
Anthony1205
Hello
Can anyone please help with this problem I have. I am using Access 97 (old I
know but good for what I need)
My form has three fields that I use for calculation: There is the [Fee]
field representing what is charged, [Amount] field representing what is paid,
and the [Balance] field which represents what is owing and is the field used
for the actual calculation.
I have used the following formula, entered directly into the Text box for
the [Balance] field:
=IIf(Nz([Fee]-[Amount]>0),Nz([Fee]-[Amount]),"Account Paid")
This calculates without a problem, provided the value of [Fee]-[Amount]>0.
All records in the form calculate properly on this basis.
However, if the value of [Fee]-[Amount] is null, the message in the text
box does change to "Account Paid" but, on trying to leave the record I get a
pop-up which says "One or more values are prohibited by the validiation rule
[Fee]-[Amount] set for 'FormFileds'. Enter a value that the expression for
this field can accept."
'FormFileds' is the name of the form I have created.
I have tried all sorts of things to get this to work, but as I am a
relatively inexperienced Access designer, I wondered whether anyone could
point out what is still escaping me although might be blindingly obvious to
them. The reason I used the Nz function was, so I believed, to ensure a value
was returned when calculating with a zero value, if you see what I mean, such
as where [Amount] was zero.
Thanks for your time.
Anthony
Can anyone please help with this problem I have. I am using Access 97 (old I
know but good for what I need)
My form has three fields that I use for calculation: There is the [Fee]
field representing what is charged, [Amount] field representing what is paid,
and the [Balance] field which represents what is owing and is the field used
for the actual calculation.
I have used the following formula, entered directly into the Text box for
the [Balance] field:
=IIf(Nz([Fee]-[Amount]>0),Nz([Fee]-[Amount]),"Account Paid")
This calculates without a problem, provided the value of [Fee]-[Amount]>0.
All records in the form calculate properly on this basis.
However, if the value of [Fee]-[Amount] is null, the message in the text
box does change to "Account Paid" but, on trying to leave the record I get a
pop-up which says "One or more values are prohibited by the validiation rule
[Fee]-[Amount] set for 'FormFileds'. Enter a value that the expression for
this field can accept."
'FormFileds' is the name of the form I have created.
I have tried all sorts of things to get this to work, but as I am a
relatively inexperienced Access designer, I wondered whether anyone could
point out what is still escaping me although might be blindingly obvious to
them. The reason I used the Nz function was, so I believed, to ensure a value
was returned when calculating with a zero value, if you see what I mean, such
as where [Amount] was zero.
Thanks for your time.
Anthony