nz([Inv_No)+1 and Len(Format([Tran_Date])) > 0 - english translation please :-)

  • Thread starter Thread starter Dave H
  • Start date Start date
D

Dave H

Hi all,

Trying to come to grips with a couple of obscure/advanced (to me anyway :-)
access queries via access help - can someone please confirm for me my
understanding of the above two expressions ?

1 - nz([Inv_No)+1 - means if Inv_No is null it will return 0+1 ? And if
Inv_No is not null will return value of Inv_No + 1 ?

2 - len(format([Tran_Date])) > 0 - means return the value of Tran_Date as a
string and if the length is greater than 0 will evaluate to true ?

Ta very muchly, Dave H.
 
Yes to both your questions.

#1 is a good idea
Nz() lets you specify a value to use for Null.
Nz([Inv_No], 0) means, "Use zero if Inv_No is Null"

#2 is a weird idea
Your interpretation is correct, but if would be better to use:
If IsNull([Tran_Date])
or possibly:
If Not IsDate([Tran_Date])
 
Back
Top