Testing for Null Values (1 Viewer)

RadioProject

New member
Local time
Today, 05:49
Joined
Dec 16, 1999
Messages
5
Hey,

I have a script that inserts a record into another table, which works fine. However the record sometimes contains NULL values and so the Insert clause doesn't work properly as it can't assign NULL values. How do I check for these NULL values and what do I assign in their place so that it will Insert without any problems.

I know for a fact that this doesn't work:

If Me.OtherNames Is Null Then
varOtherNames = "-"
Else
varOtherNames = Me.OtherNames
End If

Hope someone can help!
 
Umm, I think that you are trying to do this in the wrong order.

Try If Isnull(me.othernames) then
I'm not sure what you should insert, perhaps just a ZERO?
 

Users who are viewing this thread

Back
Top Bottom