From: Patrick on
Strange...
I have a form in datasheet view with 5 numerik fields. I added an extra
calculated field to sum the 5 numerik fields.
This all goes ok.
The 5 fields have a default value of 0, so the "new line" row contains 5
zero's with are summed as 0.
When entering a new line, the "new" new line that instantly appears gives an
error on the calculated field (#Error). This does NOT always happen.
Sometimes it does, sometimes it calculates 0
????????
What might be causing this?
--
Patrick
From: Al Campagna on
Patrick,
Sounds like you have a null in there from time to time.
Try... (use your own object names)
= NZ(Field1,0) + NZ(Field,0) .... + NZ(Field5,0)
--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

"Patrick" <Patrick(a)discussions.microsoft.com> wrote in message
news:8DBBC4AF-8A81-4777-B33F-D26C689B03CC(a)microsoft.com...
> Strange...
> I have a form in datasheet view with 5 numerik fields. I added an extra
> calculated field to sum the 5 numerik fields.
> This all goes ok.
> The 5 fields have a default value of 0, so the "new line" row contains 5
> zero's with are summed as 0.
> When entering a new line, the "new" new line that instantly appears gives
> an
> error on the calculated field (#Error). This does NOT always happen.
> Sometimes it does, sometimes it calculates 0
> ????????
> What might be causing this?
> --
> Patrick