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?
Thanks!
7 21953
Could you post your SQL for this query? This helps greatly in solving problems.
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?
Thanks!
You want something like:
SELECT tblNameAge.stName, tblNameAge.stAge, tblNameAge.Sex, tblNameAge.Married, tblNameAge.Divorced, tblNameAge.Single
FROM tblNameAge
WHERE (((tblNameAge.Divorced)=Yes)) OR (((tblNameAge.Single)=Yes));
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.
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;
Thanks!
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: -
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].[Date Closed]) Is Null) AND (([Job Log].MedWeb)=Yes))
-
OR ((([Job Log].[Date Closed]) Is Null) AND (([Job Log].Desktop)=Yes))
-
OR ((([Job Log].[Date Closed]) Is Null) AND (([Job Log].Internet)=Yes));
-
That's it! Thank you - it works perfectly now!
You're very welcome!
Jking
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...
|
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"...
|
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...
|
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...
|
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...
|
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...
|
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 ...
|
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....
|
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>...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |