# Re: 如何避免数字型态的资料栏出现Null Error !??

Posted by AndyLin on November 01, 1999 at 21:04:24:

In Reply to: 如何避免数字型态的资料栏出现Null Error !?? posted by 机子 on November 01, 1999 at 11:29:10:

:
: 例:

: Field1的资料型态是字串, Field2是数字,

: 避免读取Field1的值时候出现Null Error, 可以 - Text1.text=trim(recordset!field1 & "")

: 若要读取Field2 这样可行吗!

: 谢谢!

读字串方式:iif( isnull(field),"",trim(field))
读数值方式:iif( isnull(field),0,val(field))

Follow Ups: