Help with two queries please

nancybrown

Well-known Member
Joined
Apr 7, 2005
Messages
868
Query #1:

Three fields: 1) Owner; 2) Reconciler 3) Reviewer.
Need a to filter out any blanks for any or all of these fields

Query #2
One field: FDC Code
Need to filter out numbers "between" 7799 and 7899

Many thanks
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Criteria for 1st:
Code:
WHERE ((Not [Owner] Is Null) AND (Not ([Reconciler]) Is Null) AND (Not ([Reviewer]) Is Null));

Criteria for 2nd:
If your FDC Code field is numeric:
Code:
WHERE [FDC Code] Between 7799 And 7899;
If your FDC Code field is text:
Code:
WHERE [FDC Code] Between "7799" And "7899";
 
Upvote 0
Thank you Joe

quick question ... for the code related to blanks . . . if I use And does that mean all conditions for all three fields need to be blank? Some fields may have some data and some or all may not.
 
Upvote 0
If you look closely, it says that all three values must NOT be empty in order to return that record. That means if any of these fields is empty, it will NOT return that record (which is how I read your question - only return records where are three fields have something in them).
 
Upvote 0
Additional Help Please.

Criteria 2 . . . need to see everything that is not between 7799 and 7899. The code I used was: "not between 7799 and 7899" code worked but it did not show results with blank fields. need to see everything except for this range.


Many thanks
 
Upvote 0
Need add'l instruction . . . Three separate fields . . . owner, reconciler, reviewer . . . one report will show any and all blanks in any or all of these three fields . . . second report should not have any blanks. Please be detailed with placement of code . . . been a while since working in Access . . . out of practice.

Thank you
 
Upvote 0
In the criteria for each field in your query, place the term Not Null, but ensure that they are on separate lines so in effect you have an "Or" in your WHERE section of your SQL statement if you were to look at the SQL statement of the query.

Alan
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,756
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top