473,324 Members | 2,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

If is being ignored!

I've put this line into my code

Expand|Select|Wrap|Line Numbers
  1. If Me.Text3 = Null Then
  2.     MsgBox "Please enter the date of the exam", vbExclamation, "Date Missing"
  3.     Exit Sub
  4. End If
but every time I run it just seems to skip the if statement and keep going. This happens when I change the Null to "" or even to a value and then enter that in the text box. Am I going mad?
Feb 12 '08 #1
2 1454
FishVal
2,653 Expert 2GB
Hi, there.

Don't go mad. Just keep in mind that expression like
Something = Null
will never return True or False, but always Null which is treated by If...Then as False.
Thats why there is a special function - IsNull(), to check whether some variable has Null value.

Regards,
Fish
Feb 12 '08 #2
I so knew that! Man it's been a long ole day! Thanks for your polite response (I would have been much more sarcastic!)

Ben
Feb 12 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: melanieab | last post by:
Hi, I'm having a hard time understanding why some commands appear to be ignored during an event. I have a group of tabpages, and when one tabpage is left, I have a Focus Leave event that captures...
1
by: Chris | last post by:
I've created an aspx page that should time out every time it is executed, yet it never does. It seems as though the value of Server.ScriptTimeout is just being ignored by asp.net - I've also set...
1
by: David Hearn | last post by:
I am trying to generate a short text based email and using VBCrlf to break the lines. The problem is that they are being ignored after about the third or fourth line down into the email. I have...
4
by: james t kirk | last post by:
I'm writing a wrapper class to handle the line merging and filtering for a log file analysis app The problem I'm running into is that the StopIteration exception raised when the wrapped file...
1
by: meltedown | last post by:
https://newglobalsoaps.com/catalog/index.php?pline=7857 There is a menu on the left- its floated to the left. the div with id all is supossed to have a margin-left but its being ignored. ...
0
by: Timothy Greaves | last post by:
Hi I have a PC with XP SP2 and IIS 5.1 installed. I also have VS 2002 and Interdev 6.0 installed. I am having problems getting the system to perform JIT debugging on ASP pages. I have enabled...
6
by: maya | last post by:
<tabletag is being ignored here.. why is this.. <div id="img1"> <script type="text/javascript" language="JavaScript"> var cw = document.body.clientWidth; var ch =...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
4
by: James | last post by:
Hello, I've been testing HTML messages both with CreateMHTMLBody and HTMLBody, the problem is that the message delivered does not display css styles correctly. If I use "style" inside html tags...
4
BeemerBiker
by: BeemerBiker | last post by:
I am using veranda and x-small fonts everywhere. I even specified that font in "edit row style" and when that didnt work, anywhere I found an empty style. However, it is being ignored and a textbox...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.