472,357 Members | 1,937 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,357 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 10757
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: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
1
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. header("Location:".$urlback); Is this the right layout the...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it so the python app could use a http request to get...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...

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.