Null Value? Empty String? Zero Length?

Ajayi32

Registered User.
Local time
Today, 06:37
Joined
Feb 21, 2001
Messages
26
I have read all that I can but, I can't find a resolution for dealing with Null values.

Lets just say I have a text field. The records in the field would have either the letter A, the letter B, or nothing at all.

I want my code to return Dog if the letter is A, Cat if the letter is B, Horse if the is nothing in the field.

What do I do with the records that have nothing. I have tried using
Is Null
IsNull()
""
" "
I know it is something simple. I am using Access 97. Thank you for your time.

/uh
 
Have you heard of the Nz() function? ;)
 
  • Is Null - used in queries, can also be used in domain aggregate functions
  • IsNull() - used in expressions
  • "" - is a literal representation of the Access constant: vbNullString
  • " " - is not a null value at all, it contains a space, it's ASCII char 32
  • Nz()[/b] converts a null value to zero or, if specified, a value of your choosing
 

Users who are viewing this thread

Back
Top Bottom