473,322 Members | 1,690 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,322 software developers and data experts.

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 10944
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: evolve | last post by:
why doesn't c# seem to support some kind of 'null date' for instance: i have an application where the user is not obliged to enter a date until an event happens (e.g. a bug was fixed on xyz) ...
1
by: Vern | last post by:
I'm using the Microsoft Enterprise Data Access block to call the stored procedure. One of the values the stored procedure returns is the stop date. When the stop date is null, the program crashes....
6
by: Dean Slindee | last post by:
I am looking for the "right" way to handle inserting and presenting null date values. Public Const c_NullDate As Date = #12:00:00 AM# If I set the value of a date variable in an SQL Server insert...
1
by: GB | last post by:
Is there a function to set a null date in vb.net? Normally, I create a const NULLDATE = "1/1/1900", but that becomes a drag at times. Especially, handling a nulldate from SQL into a dataset. ...
10
by: Brad | last post by:
If I need to assign a NULL value to a date variable, how would I go about doing that? For right now I am using 01-01-2001, however I don't want to use a "real" date if the date should really be...
6
by: fonzie | last post by:
Is there any way to include two unbound text boxes (for a start date and end date) to a filter-by-form? The users may want to filter by several different fields and they may want to include a date...
0
by: Ronald S. Cook | last post by:
When I pass a null date from my client to my service project, it comes across as #12:00:00 AM#. While I can easily code for this, it seems like a hack. Is this normal? I'm using WCF, by the...
1
by: klove1209 | last post by:
Good afternoon, I am currently working on this unbounded form that has numerous date fields. I wanted to know if it is possible to save data in a form, with a null date field. I am currently...
5
by: ahd2008 | last post by:
I have a form that pop up on the sessions form. i use the below code to filter the sessions form by the strat date of the course but it seems it is not giving any result. I get only empty fields ...
1
by: mwittekiend | last post by:
I am trying to convert a NULL date to a Y/N flag. It is giving me a conversion error. Here is the code. Any help is appreciated. Thanks 'CommitDateTimeFlag' = (case when CommitDateTime IS NULL...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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....

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.