Solved

About Null

Posted on 2000-03-27
2
125 Views
Last Modified: 2010-05-02
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
Comment
Question by:Dewi
2 Comments
 
LVL 10

Accepted Solution

by:
caraf_g earned 50 total points
ID: 2660263
Use IsNull

If IsNull(objRec.Fields(2)) Then...
0
 

Author Comment

by:Dewi
ID: 2660305
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now