form Calucation

K

Kim Jackson

I have 4 fields on my form [Cst_Saving], [Yr_Saving],
[LL_recovered],[BL_recovered].
[Yr_Saving] = [Cst_Saving] * current month value.
[Cst_Saving] = [BL_recovered] + [LL_recovered].
The problem is I will not always have a [LL_recovered]
value but I still need the value from [BL_recovered] to
continue over to the [Cst_saving] to get my [Yr_saving].
If I manually put in 0 in the [LL_recovered] it will
then give me the [cst_saving]+ [BL_recovered] and give me
the [Yr_saving].
Thanks for the help
 
B

Bruce M. Thompson

I have 4 fields on my form [Cst_Saving], [Yr_Saving],
[LL_recovered],[BL_recovered].
[Yr_Saving] = [Cst_Saving] * current month value.
[Cst_Saving] = [BL_recovered] + [LL_recovered].
The problem is I will not always have a [LL_recovered]
value but I still need the value from [BL_recovered] to
continue over to the [Cst_saving] to get my [Yr_saving].
If I manually put in 0 in the [LL_recovered] it will
then give me the [cst_saving]+ [BL_recovered] and give me
the [Yr_saving].

You need to avoid referencing a "Null" value in you calculation. Try:

[Cst_Saving] = Nz([BL_recovered], 0) + Nz([LL_recovered], 0)
 
G

Guest

Thank you Bruce
-----Original Message-----
I have 4 fields on my form [Cst_Saving], [Yr_Saving],
[LL_recovered],[BL_recovered].
[Yr_Saving] = [Cst_Saving] * current month value.
[Cst_Saving] = [BL_recovered] + [LL_recovered].
The problem is I will not always have a [LL_recovered]
value but I still need the value from [BL_recovered] to
continue over to the [Cst_saving] to get my [Yr_saving].
If I manually put in 0 in the [LL_recovered] it will
then give me the [cst_saving]+ [BL_recovered] and give me
the [Yr_saving].

You need to avoid referencing a "Null" value in you calculation. Try:

[Cst_Saving] = Nz([BL_recovered], 0) + Nz ([LL_recovered], 0)

--
Bruce M. Thompson, Microsoft Access MVP
(e-mail address removed) (See the Access FAQ at http://www.mvps.org/access)within the newsgroups so that all might benefit.<<


.
 

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