Isnull And ""

What is the difference between not isnull(val) and <> ""

can this statement be reduced from

If NumberDep <> "" or not isnull(NumberDep) then HBinsertSQL = ",
NoOfDependants = " & NumberDep

to

If not isnull(NumberDep) then HBinsertSQL = ", NoOfDependants = " &
NumberDep

I would like to know what the difference is and if possible any links that
have a good description

View Replies


ADVERTISEMENT

If (IsNull)

I need help on an "If (IsNull)" issue. I'm opening a record where "Project" is a certain name. If there are publications associated with the project, I need the title "Publications" to print and then a list of the publications. This works great.

I want nothing to print when there are no publications associated with the project. The code below searches the "Magazine" field. If it's empty, nothing prints. The only way I can get this to work is to associate a empty publication to the project so that the query will return at least one record with an empty "Magazine" field. What I need is if the query returns nothing then print nothing.

CODE: ....

View Replies View Related

IsNull Check

In my functions I'm using a double-check all the time to trap if a value has
nothing in it and my question is do I need this double-check.
My check line is:

IF IsNull(xxx) OR LEN(xxx) = 0 THEN

blah blah

ELSE

blah blah

END IF

xxx is usually an array built up of data from an ADO recordset so will
LEN(xxx) = 0 cover my zero values or do I still need the IsNull check as
well?

View Replies View Related

IsNull And IsEmpty

there is no row in the table, totally empty so i try to use IsEmpty and it never return true. and isnull and isempty whats the difference?

Code: ...

View Replies View Related

IsNull & IsEmpty Not Working?

I have a database that has "thedate" as a required field. The form that I'm using to insert data allows you to leave the date field blank. If left blank, I want to automatically insert today's date.

If I fill in a date, it works fine & the data is inserted. But if I leave it blank I get an error. This is my code:

View Replies View Related

IsNull Update Statment

I need to know how to do this IsNull update statment in ASP:

"UPDATE tblUsers SET username='" & lcUName & "', hash= IIf(IsNull([lcHash]),"",[lcNewHash]), inactive=" & llAct & ", locked=" & llLock & ", isadmin=" & llAdmin & ", attempts=" & lnAttempt & ", lastlogin=" & ldLastLogin & ", onlyreadaccess=" & llOnlyRead & " WHERE UserID = " & lnSetID

View Replies View Related

Memo Field And Isnull Issue

i am testing if my memo field (access DB) has anything in it by doing

if isnull(rs("memofld")) then

do this

end if

The script is not picking up a valid value if it is null or not. I have also tried testing for it equalling "" but no lick either.

Read alot of stuff online with people having the same problem but no luck. I have tried selecting the memo field last in the sql query but this makes no difference.

View Replies View Related

IsNull Function Requires 2 Arguments Error

I used this to sum column with nulls and it worked fine but then when I tried to do the same with the next column over, I get "IsNull function requires 2 arguments error".

In my select statement:

Sum(IsNull([1st Qtr],0)) as Sum1QN

The one above worked fine, so I thought I would just do the same for the next column over like so:

Sum(IsNull([2nd Qtr]),0)) as Sum2QN

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved