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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top