dbTalk Databases Forums  

IF statement

comp.databases.ms-access comp.databases.ms-access


Discuss IF statement in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Barry
 
Posts: n/a

Default IF statement - 08-26-2010 , 07:50 AM






I want to compare a field to null

The field is Notice Date

I have tried a number of ways and it is not working what is the
correct way.

Thanks

Barry

Reply With Quote
  #2  
Old   
Bob Quintal
 
Posts: n/a

Default Re: IF statement - 08-26-2010 , 08:29 AM






Barry <Barry (AT) actson (DOT) demon.co.uk> wrote in news:26c1f076-74b3-42e4-b22e-
43e0ab1dd20b (AT) v8g2000yqe (DOT) googlegroups.com:

Quote:
I want to compare a field to null

The field is Notice Date

I have tried a number of ways and it is not working what is the
correct way.

Thanks

Barry

You use the isnull() function.

If isNull([Notice Date]) Then
'do something here
End If

Reply With Quote
  #3  
Old   
WhathaveIdone?
 
Posts: n/a

Default Re: IF statement - 08-26-2010 , 09:42 AM



On Aug 26, 7:29*am, Bob Quintal <rquin... (AT) sPAmpatico (DOT) ca> wrote:
Quote:
Barry <Ba... (AT) actson (DOT) demon.co.uk> wrote in news:26c1f076-74b3-42e4-b22e-
43e0ab1dd... (AT) v8g2000yqe (DOT) googlegroups.com:

I want to compare a field to null

The field is Notice Date

I have tried a number of ways and it is not working what is the
correct way.

Thanks

Barry

You use the isnull() function.

If isNull([Notice Date]) Then
* * * * 'do something here
End If
I concur with this: IsNull() would be whether to test if the field is
null or not. If this isn't what you meant, you may want to give a
little more explanation.
-WhathaveIdone?

Reply With Quote
  #4  
Old   
David W. Fenton
 
Posts: n/a

Default Re: IF statement - 08-26-2010 , 04:18 PM



Barry <Barry (AT) actson (DOT) demon.co.uk> wrote in
news:26c1f076-74b3-42e4-b22e-43e0ab1dd20b (AT) v8g2000yqe (DOT) googlegroups.com
:

Quote:
I want to compare a field to null
In what context? A query? Code? A macro?

Quote:
The field is Notice Date

I have tried a number of ways and it is not working what is the
correct way.
Show us what you've tried -- it makes it easier to provide a
solution.

--
David W. Fenton http://www.dfenton.com/
contact via website only http://www.dfenton.com/DFA/

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.