Nulls Problems

S

Simon

Can anyone help me with this one?

I want to return the string "Record is Null" is the file is in fact a Null
but I keep getting an "object required" error message.
I am using the following code.

If oRs("Individual_Title") Is Null Then strIndividual_Title =
oRs("Individual_Title") Else strIndividual_Title = "Record is Null"

Thanks
 
S

Simon

Sorry - code should read..............

If oRs("Individual_Title") Is Not Null Then strIndividual_Title =
oRs("Individual_Title") Else strIndividual_Title = "none"

Thanks
 
R

Ron Weiner

Simon

Take a look at the NZ() function in Help.

strIndividual_Title = nz(oRs("Individual_Title") ,"Record is Null")

Ron W
 
Top