469,275 Members | 1,802 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

filter with form--test for null date

I have a shortdate text box (MyDate) that I want to filter by testing
for a null value, but:

Me.Filter = "MyDate = Is Null"
Me.FitlerOn = True

does not work. I also tried a null string ("MyDate = ''") and paired
delimiters ("MyDate = ##") but can't get it to work. I assume it has
something to do with the date format. Any hints?

thanks

Nov 13 '05 #1
4 10229
mhod...@comcast.net wrote:
I have a shortdate text box (MyDate) that I want to filter by testing
for a null value, but:

Me.Filter = "MyDate = Is Null"
Me.FitlerOn = True

does not work. I also tried a null string ("MyDate = ''") and paired
delimiters ("MyDate = ##") but can't get it to work. I assume it has
something to do with the date format. Any hints?

thanks


Try:

Me.Filter = "MyDate Is Null"

James A. Fortune

58% of teenagers believe they will become wealthy. The two main
avenues for attaining that wealth are envisioned to be 1) winning the
lottery 2) winning a tort
-- NPR radio

Nov 13 '05 #2
Thanks...worked fine. How would one have known that?

Nov 13 '05 #3
mhod...@comcast.net wrote:
Thanks...worked fine. How would one have known that?


The setting or return value is a String data type that contains the
WHERE clause of an SQL statement without the reserved word WHERE. --
A97 Filter Property Help

Try this experiment:

Create a new query. Select a table. Select a field. Put Null as the
Criteria. Look at the SQL view. Note: If you take off the parentheses
it will still run correctly.

James A. Fortune

Nov 13 '05 #4
Try:

If Me.Filter = IsNull([MyDate]) Then
Me.FitlerOn = True
Else
Me.FilterOn = False
End If

-Ed

<mh*****@comcast.net> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
I have a shortdate text box (MyDate) that I want to filter by testing
for a null value, but:

Me.Filter = "MyDate = Is Null"
Me.FitlerOn = True

does not work. I also tried a null string ("MyDate = ''") and paired
delimiters ("MyDate = ##") but can't get it to work. I assume it has
something to do with the date format. Any hints?

thanks

Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by evolve | last post: by
6 posts views Thread by Dean Slindee | last post: by
1 post views Thread by GB | last post: by
10 posts views Thread by Brad | last post: by
reply views Thread by Ronald S. Cook | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.