Solved

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

Posted on 2011-09-18
2
311 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

895 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

14 Experts available now in Live!

Get 1:1 Help Now