Access 97 - Simple Calculation

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
 
D

Douglas J. Steele

Your parentheses are incorrect

=IIf(Nz([Fee]-[Amount])>0,Nz([Fee]-[Amount]),"Account Paid")

athough it might be better to use

=IIf(Nz([Fee],0)-Nz([Amount],0)>0,Nz([Fee],0)-Nz([Amount],0),"Account Paid")
 
A

Anthony1205

Thanks for your help.

I tried both suggested solutions but, unfortunately, I still receive the
pop-up message each time to the effect that "One or more values are
prohibited by the validiation rule".

Thanks

Anthony


Douglas J. Steele said:
Your parentheses are incorrect

=IIf(Nz([Fee]-[Amount])>0,Nz([Fee]-[Amount]),"Account Paid")

athough it might be better to use

=IIf(Nz([Fee],0)-Nz([Amount],0)>0,Nz([Fee],0)-Nz([Amount],0),"Account Paid")

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Anthony1205 said:
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
 
D

Douglas J. Steele

Sounds as though you've got a validation rule set on the field in the table.

What are you hoping that the rule will do for you?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Anthony1205 said:
Thanks for your help.

I tried both suggested solutions but, unfortunately, I still receive the
pop-up message each time to the effect that "One or more values are
prohibited by the validiation rule".

Thanks

Anthony


Douglas J. Steele said:
Your parentheses are incorrect

=IIf(Nz([Fee]-[Amount])>0,Nz([Fee]-[Amount]),"Account Paid")

athough it might be better to use

=IIf(Nz([Fee],0)-Nz([Amount],0)>0,Nz([Fee],0)-Nz([Amount],0),"Account
Paid")

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Anthony1205 said:
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
 
A

Anthony1205

Thanks for getting back.

I've checked the fields for the three boxes ([Fee], [Amount] and [Balance])
but there are no rules set in the table. Nor are there any validation rules
set for the fields in the form.

The format for the fields is currency, so that [Balance] shows what is owing
when [Amount] is deducted from [Fee].

Hence, I am puzzled as to why the message keeps popping up.

Regards

Anthony



Douglas J. Steele said:
Sounds as though you've got a validation rule set on the field in the table.

What are you hoping that the rule will do for you?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Anthony1205 said:
Thanks for your help.

I tried both suggested solutions but, unfortunately, I still receive the
pop-up message each time to the effect that "One or more values are
prohibited by the validiation rule".

Thanks

Anthony


Douglas J. Steele said:
Your parentheses are incorrect

=IIf(Nz([Fee]-[Amount])>0,Nz([Fee]-[Amount]),"Account Paid")

athough it might be better to use

=IIf(Nz([Fee],0)-Nz([Amount],0)>0,Nz([Fee],0)-Nz([Amount],0),"Account
Paid")

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


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
 
D

Douglas J. Steele

I'm wondering whether this is a red herring.

From what you originally posted, it sounds as though you've set the
ControlSource of a text box to the IIf statement. That means it's not being
stored, as the text box isn't bound to anything. Check the other fields in
your table to see whether they've got validations.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Anthony1205 said:
Thanks for getting back.

I've checked the fields for the three boxes ([Fee], [Amount] and
[Balance])
but there are no rules set in the table. Nor are there any validation
rules
set for the fields in the form.

The format for the fields is currency, so that [Balance] shows what is
owing
when [Amount] is deducted from [Fee].

Hence, I am puzzled as to why the message keeps popping up.

Regards

Anthony



Douglas J. Steele said:
Sounds as though you've got a validation rule set on the field in the
table.

What are you hoping that the rule will do for you?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Anthony1205 said:
Thanks for your help.

I tried both suggested solutions but, unfortunately, I still receive
the
pop-up message each time to the effect that "One or more values are
prohibited by the validiation rule".

Thanks

Anthony


:

Your parentheses are incorrect

=IIf(Nz([Fee]-[Amount])>0,Nz([Fee]-[Amount]),"Account Paid")

athough it might be better to use

=IIf(Nz([Fee],0)-Nz([Amount],0)>0,Nz([Fee],0)-Nz([Amount],0),"Account
Paid")

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


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
 
A

Anthony1205

I think I may have misled you inadvertently. The field was created from the
table using the form wizard, and the data type in the table was set to
currency (for all three fields). So I did not actually set it to Text. Hope
that makes sense.

Having checked again to confirm that there are no validation rules in the
three fields referred, I cannot figure out why the message keeps popping up
that I should check the validation rule [Fee]-[Amount].

Anthony

Douglas J. Steele said:
I'm wondering whether this is a red herring.

From what you originally posted, it sounds as though you've set the
ControlSource of a text box to the IIf statement. That means it's not being
stored, as the text box isn't bound to anything. Check the other fields in
your table to see whether they've got validations.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Anthony1205 said:
Thanks for getting back.

I've checked the fields for the three boxes ([Fee], [Amount] and
[Balance])
but there are no rules set in the table. Nor are there any validation
rules
set for the fields in the form.

The format for the fields is currency, so that [Balance] shows what is
owing
when [Amount] is deducted from [Fee].

Hence, I am puzzled as to why the message keeps popping up.

Regards

Anthony



Douglas J. Steele said:
Sounds as though you've got a validation rule set on the field in the
table.

What are you hoping that the rule will do for you?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Thanks for your help.

I tried both suggested solutions but, unfortunately, I still receive
the
pop-up message each time to the effect that "One or more values are
prohibited by the validiation rule".

Thanks

Anthony


:

Your parentheses are incorrect

=IIf(Nz([Fee]-[Amount])>0,Nz([Fee]-[Amount]),"Account Paid")

athough it might be better to use

=IIf(Nz([Fee],0)-Nz([Amount],0)>0,Nz([Fee],0)-Nz([Amount],0),"Account
Paid")

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


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
 
D

Douglas J. Steele

Your original post stated "I have used the following formula, entered
directly into the Text box for the [Balance] field". What did you mean by
that? If you've typed that formula into a text box on a form (or directly
into the field when you've got the table open), you're typing text into a
currency field. Access may look like Excel, but it's very different: you
cannot type formulae into table fields.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Anthony1205 said:
I think I may have misled you inadvertently. The field was created from the
table using the form wizard, and the data type in the table was set to
currency (for all three fields). So I did not actually set it to Text.
Hope
that makes sense.

Having checked again to confirm that there are no validation rules in the
three fields referred, I cannot figure out why the message keeps popping
up
that I should check the validation rule [Fee]-[Amount].

Anthony

Douglas J. Steele said:
I'm wondering whether this is a red herring.

From what you originally posted, it sounds as though you've set the
ControlSource of a text box to the IIf statement. That means it's not
being
stored, as the text box isn't bound to anything. Check the other fields
in
your table to see whether they've got validations.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Anthony1205 said:
Thanks for getting back.

I've checked the fields for the three boxes ([Fee], [Amount] and
[Balance])
but there are no rules set in the table. Nor are there any validation
rules
set for the fields in the form.

The format for the fields is currency, so that [Balance] shows what is
owing
when [Amount] is deducted from [Fee].

Hence, I am puzzled as to why the message keeps popping up.

Regards

Anthony



:

Sounds as though you've got a validation rule set on the field in the
table.

What are you hoping that the rule will do for you?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Thanks for your help.

I tried both suggested solutions but, unfortunately, I still receive
the
pop-up message each time to the effect that "One or more values are
prohibited by the validiation rule".

Thanks

Anthony


:

Your parentheses are incorrect

=IIf(Nz([Fee]-[Amount])>0,Nz([Fee]-[Amount]),"Account Paid")

athough it might be better to use

=IIf(Nz([Fee],0)-Nz([Amount],0)>0,Nz([Fee],0)-Nz([Amount],0),"Account
Paid")

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
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
 
A

Anthony1205

I am sorry if I used the wrong terminology, but my initial post is the
correct position, namely, "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."

The formula has been entered directly into the box under the label in form
design view.

Hope that clarifies things. Sorry for the confusion.

Anthony


Douglas J. Steele said:
Your original post stated "I have used the following formula, entered
directly into the Text box for the [Balance] field". What did you mean by
that? If you've typed that formula into a text box on a form (or directly
into the field when you've got the table open), you're typing text into a
currency field. Access may look like Excel, but it's very different: you
cannot type formulae into table fields.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Anthony1205 said:
I think I may have misled you inadvertently. The field was created from the
table using the form wizard, and the data type in the table was set to
currency (for all three fields). So I did not actually set it to Text.
Hope
that makes sense.

Having checked again to confirm that there are no validation rules in the
three fields referred, I cannot figure out why the message keeps popping
up
that I should check the validation rule [Fee]-[Amount].

Anthony

Douglas J. Steele said:
I'm wondering whether this is a red herring.

From what you originally posted, it sounds as though you've set the
ControlSource of a text box to the IIf statement. That means it's not
being
stored, as the text box isn't bound to anything. Check the other fields
in
your table to see whether they've got validations.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Thanks for getting back.

I've checked the fields for the three boxes ([Fee], [Amount] and
[Balance])
but there are no rules set in the table. Nor are there any validation
rules
set for the fields in the form.

The format for the fields is currency, so that [Balance] shows what is
owing
when [Amount] is deducted from [Fee].

Hence, I am puzzled as to why the message keeps popping up.

Regards

Anthony



:

Sounds as though you've got a validation rule set on the field in the
table.

What are you hoping that the rule will do for you?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Thanks for your help.

I tried both suggested solutions but, unfortunately, I still receive
the
pop-up message each time to the effect that "One or more values are
prohibited by the validiation rule".

Thanks

Anthony


:

Your parentheses are incorrect

=IIf(Nz([Fee]-[Amount])>0,Nz([Fee]-[Amount]),"Account Paid")

athough it might be better to use

=IIf(Nz([Fee],0)-Nz([Amount],0)>0,Nz([Fee],0)-Nz([Amount],0),"Account
Paid")

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
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
 
D

Douglas J. Steele

As I already said, you cannot put formulae into text boxes.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Anthony1205 said:
I am sorry if I used the wrong terminology, but my initial post is the
correct position, namely, "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."

The formula has been entered directly into the box under the label in form
design view.

Hope that clarifies things. Sorry for the confusion.

Anthony


Douglas J. Steele said:
Your original post stated "I have used the following formula, entered
directly into the Text box for the [Balance] field". What did you mean by
that? If you've typed that formula into a text box on a form (or directly
into the field when you've got the table open), you're typing text into a
currency field. Access may look like Excel, but it's very different: you
cannot type formulae into table fields.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Anthony1205 said:
I think I may have misled you inadvertently. The field was created from
the
table using the form wizard, and the data type in the table was set to
currency (for all three fields). So I did not actually set it to Text.
Hope
that makes sense.

Having checked again to confirm that there are no validation rules in
the
three fields referred, I cannot figure out why the message keeps
popping
up
that I should check the validation rule [Fee]-[Amount].

Anthony

:

I'm wondering whether this is a red herring.

From what you originally posted, it sounds as though you've set the
ControlSource of a text box to the IIf statement. That means it's not
being
stored, as the text box isn't bound to anything. Check the other
fields
in
your table to see whether they've got validations.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Thanks for getting back.

I've checked the fields for the three boxes ([Fee], [Amount] and
[Balance])
but there are no rules set in the table. Nor are there any
validation
rules
set for the fields in the form.

The format for the fields is currency, so that [Balance] shows what
is
owing
when [Amount] is deducted from [Fee].

Hence, I am puzzled as to why the message keeps popping up.

Regards

Anthony



:

Sounds as though you've got a validation rule set on the field in
the
table.

What are you hoping that the rule will do for you?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
Thanks for your help.

I tried both suggested solutions but, unfortunately, I still
receive
the
pop-up message each time to the effect that "One or more values
are
prohibited by the validiation rule".

Thanks

Anthony


:

Your parentheses are incorrect

=IIf(Nz([Fee]-[Amount])>0,Nz([Fee]-[Amount]),"Account Paid")

athough it might be better to use

=IIf(Nz([Fee],0)-Nz([Amount],0)>0,Nz([Fee],0)-Nz([Amount],0),"Account
Paid")

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
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
 
A

Anthony1205

So how does the formula work in all instances save where the result is zero?

Douglas J. Steele said:
As I already said, you cannot put formulae into text boxes.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Anthony1205 said:
I am sorry if I used the wrong terminology, but my initial post is the
correct position, namely, "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."

The formula has been entered directly into the box under the label in form
design view.

Hope that clarifies things. Sorry for the confusion.

Anthony
 
D

Douglas J. Steele

I have no idea, since I cannot understand what you've done.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Anthony1205 said:
So how does the formula work in all instances save where the result is
zero?

Douglas J. Steele said:
As I already said, you cannot put formulae into text boxes.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Anthony1205 said:
I am sorry if I used the wrong terminology, but my initial post is the
correct position, namely, "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."

The formula has been entered directly into the box under the label in
form
design view.

Hope that clarifies things. Sorry for the confusion.

Anthony
 
A

Anthony1205

I have done nothing other than enter the formula, with which you assisted me,
into the field for [Balance]. The field (and formula) deals with all values
save for negative or zero balances. However, it is only the zero value that
throws up the pop-up alert that I mentioned.



Douglas J. Steele said:
I have no idea, since I cannot understand what you've done.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Anthony1205 said:
So how does the formula work in all instances save where the result is
zero?

Douglas J. Steele said:
As I already said, you cannot put formulae into text boxes.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I am sorry if I used the wrong terminology, but my initial post is the
correct position, namely, "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."

The formula has been entered directly into the box under the label in
form
design view.

Hope that clarifies things. Sorry for the confusion.

Anthony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top