Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 132
  • Last Modified:

About Null

I have a problem with Null in VB6

If objRec.Fields(2) = Null then
    ....
    ....
    Msgbox "Success"
End If

but the message box never appears
when I debug the code, objRec.Fields(2) valued is Null.
I think it should be true
what's wrong with this ?
anyone can help ?

  Dewi
0
Dewi
Asked:
Dewi
1 Solution
 
caraf_gCommented:
Use IsNull

If IsNull(objRec.Fields(2)) Then...
0
 
DewiAuthor Commented:
Hi caraf_g,

Thank's for your help
It's very easy, How fooled I am :)

one more question,
do you know how to create table with auto increamental field (using MSSQL) ?
http://www.experts-exchange.com/jsp/qShow.jsp?ta=mssql&qid=10318041 

  Dewi
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now