By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,105 Members | 1,040 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,105 IT Pros & Developers. It's quick & easy.

filter with form--test for null date

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
Thanks...worked fine. How would one have known that?

Nov 13 '05 #3

P: n/a
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

P: n/a
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.