form Calucation

  • Thread starter Thread starter Kim Jackson
  • Start date Start date
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
 
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)
 
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.<<


.
 
Back
Top