From: Kenj on
I Have a broblem with this =[Line Total1]+[Line Total2]+[Line Total3]
+[Line Total4]+[Line Total5]+[Line Total6][Line Total7]+[Line Total8]+[Line
Total9]+[Line Total10]+[Line Total11]+[Line Total12]+[Line Total13]+[Line
Total14]+[Line Total15]+[Line Total16]+[Line Total17]+[Line Total18]+[Line
Total19]+[Line Total20]+[Line Total21]+[Line Total22]+[Line Total23]+[Line
Total24]+[Line Total25] If I dont put data in all the fields I get anything.
From: fredg on
On Thu, 21 Jan 2010 21:12:01 -0800, Kenj wrote:

> I Have a broblem with this =[Line Total1]+[Line Total2]+[Line Total3]
> +[Line Total4]+[Line Total5]+[Line Total6][Line Total7]+[Line Total8]+[Line
> Total9]+[Line Total10]+[Line Total11]+[Line Total12]+[Line Total13]+[Line
> Total14]+[Line Total15]+[Line Total16]+[Line Total17]+[Line Total18]+[Line
> Total19]+[Line Total20]+[Line Total21]+[Line Total22]+[Line Total23]+[Line
> Total24]+[Line Total25] If I dont put data in all the fields I get anything.

Look up the Nz function in VBA help.
=Nz([Line Total1],0)+Nz([Line Total2],0) + Nz(etc....)

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
From: Piet Linden on
On Jan 21, 11:12 pm, Kenj <K...(a)discussions.microsoft.com> wrote:
> I Have a broblem with this =[Line Total1]+[Line Total2]+[Line Total3]
> +[Line Total4]+[Line Total5]+[Line Total6][Line Total7]+[Line Total8]+[Line
> Total9]+[Line Total10]+[Line Total11]+[Line Total12]+[Line Total13]+[Line
> Total14]+[Line Total15]+[Line Total16]+[Line Total17]+[Line Total18]+[Line
> Total19]+[Line Total20]+[Line Total21]+[Line Total22]+[Line Total23]+[Line
> Total24]+[Line Total25] If I dont put data in all the fields I get anything.

wrap them in Nz([Line Total1])
From: Gina Whipp on
Kenj,

Because you can't add a number to nothing, so we have to account for the
nothingness. Each 'Line Total' must be *wrapped* with Nz(), ie...

Nz([Line Total1],0)

As a side note, a little concerned about your table set up. It looks like
you commited spreadsheet with your database. Perhaps if you elaborate we
can offer a better solution.

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Kenj" <Kenj(a)discussions.microsoft.com> wrote in message
news:B3F00E67-BF67-46A1-B7DE-3794EF2371CA(a)microsoft.com...
>I Have a broblem with this =[Line Total1]+[Line Total2]+[Line Total3]
> +[Line Total4]+[Line Total5]+[Line Total6][Line Total7]+[Line
> Total8]+[Line
> Total9]+[Line Total10]+[Line Total11]+[Line Total12]+[Line Total13]+[Line
> Total14]+[Line Total15]+[Line Total16]+[Line Total17]+[Line Total18]+[Line
> Total19]+[Line Total20]+[Line Total21]+[Line Total22]+[Line Total23]+[Line
> Total24]+[Line Total25] If I dont put data in all the fields I get
> anything.