Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NZ(FREIGHT1,0) now only works if I use VAL(NZ(FREIGHT1,0))

Status
Not open for further replies.

franksirvent

Programmer
Mar 8, 2002
358
GB
Hi

I have a problem...until now I used to do some calculations as:
temp = Nz([Freight1], 0) + nz([Freight6], 0)

and it worked fined BUT now it only works as :

temp = Val(Nz([Freight1], 0)) + Val([Freight6], 0))

If I don't put the VAL part, it doesn't add the fields correctly...

Is there something that causes this to happen ???
I might have changed some General parameter but I don't know what
Any ideas are appreciated

thanks






 
is freight stored as text or number?

if it's stored as text, then access might be casting the 0 as text which will mess up your calcs...
 
thanks for answering

the field is numeric (standard format, 2 decimal places)

Like I said, it has been working fine (all the formulas) but now, for some strange reason, it needs the VAL part to make it work...
 
Please disregard.

I have closed Access and reopened the application and...it works fine again!

There must have been something wrong with Access, sometimes it does that, at least on my computer...

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top