473,573 Members | 2,944 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Query Where Date "is null" not working

5 New Member
Hello all,

Access 2003 Windows PC:

I am trying to figure out why my Query isn't working. In this query, I want to get only those jobs that are still open and where at least one of four Yes/No fields is "Yes".

In my query, "Date Closed" field criteria "is null". My result is a listing of all jobs that have at least one of the four Yes/No fields, regardless of close date. Any suggestions?

Jul 25 '07 #1
7 21975
1,206 Recognized Expert Top Contributor
Could you post your SQL for this query? This helps greatly in solving problems.
Jul 25 '07 #2
65 New Member
Hello all,

Access 2003 Windows PC:

I am trying to figure out why my Query isn't working. In this query, I want to get only those jobs that are still open and where at least one of four Yes/No fields is "Yes".

In my query, "Date Closed" field criteria "is null". My result is a listing of all jobs that have at least one of the four Yes/No fields, regardless of close date. Any suggestions?

You want something like:

SELECT tblNameAge.stNa me, tblNameAge.stAg e, tblNameAge.Sex, tblNameAge.Marr ied, tblNameAge.Divo rced, tblNameAge.Sing le
FROM tblNameAge
WHERE (((tblNameAge.D ivorced)=Yes)) OR (((tblNameAge.S ingle)=Yes));
Jul 26 '07 #3
1,206 Recognized Expert Top Contributor
Yes, that's what I'm looking for but post the SQL for the query you're having a problem with. The one you spoke of in your first post.
Jul 26 '07 #4
5 New Member
Okay - her is what I have:

SELECT [Job Log].[Date Closed], [Job Log].WebDueDate, [Job Log].ThePulse, [Job Log].Internet, [Job Log].Desktop, [Job Log].MedWeb, [Job Log].[Job ID], [Job Log].[Document Name], [Job Log].[Marketing Rep Name]
FROM [Job Log]
WHERE ((([Job Log].[Date Closed]) Is Null) AND (([Job Log].ThePulse)=Yes) ) OR ((([Job Log].Internet)=(Yes ))) OR ((([Job Log].Desktop)=(Yes) )) OR ((([Job Log].MedWeb)=(Yes)) )
ORDER BY [Job Log].WebDueDate;

Jul 26 '07 #5
1,206 Recognized Expert Top Contributor
Hi there, the problem is that the Null constraint on the date is only being placed in the first case. If you look at the where statement as having seperate cases split by the keyword OR then you will see that its groups DateClosed and ThePulse as one and then each of the other Yes/no fields as a seperate case or condition if you will.

So here's how you can fix it:
Expand|Select|Wrap|Line Numbers
  1. SELECT [Job Log].[Date Closed], [Job Log].WebDueDate, [Job Log].ThePulse, [Job Log].Internet, [Job Log].Desktop, [Job Log].MedWeb, [Job Log].[job ID], [Job Log].[Document Name], [Job Log].[Marketing Rep Name]
  2. FROM [Job Log]
  3. WHERE ((([Job Log].[Date Closed]) Is Null) AND (([Job Log].ThePulse)=Yes))
  4. OR ((([Job Log].[Date Closed]) Is Null) AND (([Job Log].MedWeb)=Yes)) 
  5. OR ((([Job Log].[Date Closed]) Is Null) AND (([Job Log].Desktop)=Yes)) 
  6. OR ((([Job Log].[Date Closed]) Is Null) AND (([Job Log].Internet)=Yes));
Jul 26 '07 #6
5 New Member
That's it! Thank you - it works perfectly now!
Jul 26 '07 #7
1,206 Recognized Expert Top Contributor
You're very welcome!

Jul 26 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Nuno Paquete | last post by:
Hi group. I'm using this code to see if is there any parameter for variable "menu": if($_GET == "downloads") .... But this code log errors if there is no parameter passed (this heappens at the first time the page is loaded). I tryed this code:
by: gary | last post by:
Hi, We all know the below codes are dangerous: { int *p = new int; delete p; delete p; } And we also know the compilers do not delete p if p==NULL. So why compilers do not "p = NULL" automatically after programs do "delete p"?
by: jno.aubrey | last post by:
I have a Access 97 query that has in its where clause: And ((tbl_01_LoanData.PayOffDate) Is Null) Upon execution, all records returned have no PayOffDate except 1. When I include PayOffDate in the select list one record shows a date of '12/16/2005' - clearly not a null value. Shouldn't the above code filter this out? Many thanks! -Jeff
by: sfeher | last post by:
Hi All, The following code returns a valid xmlDoc (since I can evaluate and selectNodes) but its value is "xmlDoc= null" ?! Or at least this is what the FireBug shows and (xmlDoc===null) is true. var parser = new DOMParser(); var xmlDoc = parser.parseFromString( responseText, "text/xml"); // at this point: xmlDoc= null
by: Paul | last post by:
Hi All. We have a custom class which we serialize. This class is regularly updated, and the old requests do not have a problem opening, apart from a couple!!! When it try's to deserialize the class I receive "One of the serialized keys is null". I tried to change the constructor "below" to check if the object is null to change is to a new...
by: Seeker | last post by:
First of, Hey there :). I've been reading a few threads on Access and whatnot, but I cant seem to find the answer I need. First off, I am a newbie when it comes to computers, so bear with me please. I am using Access 2003, currently creating a database in order to tranfer our information from our current database, Approach. I am...
by: yeoj13 | last post by:
Hello, I have a db2load script I'm using to populate a large table. Ideally, my target table is required to have "Not Null" constraints on a number of different columns. I've noticed a huge performance hit when I load the target table with "Not Null" constraints as compared to loading a target table without the constraints.
by: veaux | last post by:
Question deals with linking tables in queries. I'm not a code writer so use the GUI for all my queries. Table 1 - Master Table 2 - Sub1 Table 3 - Sub 2 All 3 tables have the same key field. I'm trying to find all the records that are in "Master", that are not
by: cleary1981 | last post by:
I have adapted code from http://dunnbypaul.net/js_mouse/ I want to use a button to create new draggable divs but i keep getting error "is null or not an object" heres the code <html> <head> <title>Drag and drop module</title> <style type="text/css"> #canvas {
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.