Solved

Access 2010 - If stmt not executing on true value of NULL

Posted on 2011-09-18
2
308 Views
Last Modified: 2012-05-12
I have the following IF stmt:

if recordset1!samplevalue = null then
  msgbox "true"
else
  msgbox "false"
end if

The value of recordset1!samplevalue is NULL but the message "true" is skipped over and "false" is printed instead.  I've also tried using "if recordset1!samplevalue is null" but wrong answer pops up.
0
Comment
Question by:SFWolverine
2 Comments
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 125 total points
ID: 36558310
try this

If isnull(recordset1!samplevalue) then

msgbox "true"

else
  msgbox "false"
end if
0
 

Author Closing Comment

by:SFWolverine
ID: 36558406
Thank you!
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

This article describes some very basic things about SQL Server filegroups.
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

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