Filter issues

Hello everyone,

Here is my situation.  I have a query that needs to return data depending on 
certain criteria.  There are 3 date fields that the query has to look at:  
BOY, EOY and MOY.
If all 3 fields are blank, I don't want the query to display those records.  
If any one of the fields has a date between 7/1/2006 and 6/30/2007, then I 
want the query to return that record.  

There is one more thing that has to be taken into consideration.  There are 
2 other fields that must be looked at and can be done separately.  If the 
difference between the enrollment date and termination date fields is less 
than 45 days, I don't want those records returned either.

Can anyone help me with this?

Thank you in advance for your expertise and knowledge.
0
Utf
7/11/2007 12:10:01 AM
access.queries 6343 articles. 1 followers. Follow

1 Replies
462 Views

Similar Articles

[PageSpeed] 5

I'm assuming that you are doing this in the query design grid.

For the BOY, EOY and MOY fields, enter
    Between #7/1/2006# and #6/30/2007#
in the criteria field, in a SEPARATE ROW for each field.

For the criteria for the 2 other fields which must be looked at, enter the 
criteria in EACH of the rows where the BOY, EOY and MOY criteria are 
entered.

For the difference between enrollment date and termination date, add a 
calculated field to your query:
    ElapsedDays: DateDiff("d",[NameOf 
EnrollmentDateField],[NameOfTerminationDateField])
(substituting the correct field names for enrollment date and termination 
date fields), and set the criteria for this field (again in each criteria 
row) to >=45

HTH,

Rob

"SVE" <SVE@discussions.microsoft.com> wrote in message 
news:A84A81B1-F99B-443B-8AC7-3DAC44551EBF@microsoft.com...
> Hello everyone,
>
> Here is my situation.  I have a query that needs to return data depending 
> on
> certain criteria.  There are 3 date fields that the query has to look at:
> BOY, EOY and MOY.
> If all 3 fields are blank, I don't want the query to display those 
> records.
> If any one of the fields has a date between 7/1/2006 and 6/30/2007, then I
> want the query to return that record.
>
> There is one more thing that has to be taken into consideration.  There 
> are
> 2 other fields that must be looked at and can be done separately.  If the
> difference between the enrollment date and termination date fields is less
> than 45 days, I don't want those records returned either.
>
> Can anyone help me with this?
>
> Thank you in advance for your expertise and knowledge. 


0
Rob
7/11/2007 12:59:42 AM
Reply:

Similar Artilces:

Filters *SOS* Filters *SOS* Filters *SOS*
1) On formLoad, I need to show only those items which are unassigned. 2) I need for the end-under to select only the items they are assigned to. 3) I need an option to select "ALL" so I can view all items. Any insight offered would be appreciated!!! On Wed, 29 Aug 2007 16:24:01 -0700, valdaiway <valdaiway@discussions.microsoft.com> wrote: >1) On formLoad, I need to show only those items which are unassigned. Use a query to put a criterion on the field that defines the assigned status. I assume you know how that information is stored in your table; nobody here does, ...

Criteria for Advanced Filter HELP
I have what I think is a simple question that I need answered IMMEDIATELY. I have a spreadsheet with 20 fields and I want to filter it so it only shows records that have something in of any of 5 of those fields. So once filtered, I will not have any records that have all 5 of those fields blank. I know I have done this before but I'll be damned if I can remember or find out how. -- Thanks You all are teaching me so much don't cross-post -- answer supplied in misc NG "knowshowrosegrows" <knowshowrosegrows@discussions.microsoft.com> wrote in message news:ACBC0...

Employee Filters
Hello: On the employee filters in the HR Preferenes window, would this restrict seeing employee information in both Payroll and HR? Also, would it restrict reporting on certain employees in a division or department? Thanks! childofthe1980s Your message does not indicate which version of Great Plains you are using. Using 8.0 with SP3 applied, HR filters do apply to some of employee information outside of HR. The settings will filter selected forms, Smartlists and Lists items. The HR filter setting do not apply to reports outside of HR. The filtered forms are: Employee Maintenance,...

Windows 7/Outlook/SBS2003 crashing issue
I have a client with a new Windows 7 laptop. Added it to his SBS2003 domain via http://servername/connectcomputer, all seemed to work as normal. Installed Office 2007 and SP2, setup Outlook for him, added his extra mailboxes, all looked fine. After the weekend, he came in and was unable to open Outlook, it crashed with an uninformative error. I narrowed the issue down to communication with the server : with a clean Outlook profile, as soon as I put in a server name and clicked Check Name, Outlook would crash. Resolved this temporarily by doing a system restore back to before...

Filtering based on a filter
Hello, I have an Excel Worksheet with a Pivot Table at the top with a Filter and a data set returned from a DB2 database below it. I would like to filter the DB2 data set based on the Pivot Table filter that is enabled. Any ideas? Thanks! James, You can't filter two ranges on the same worksheet. You can, instead, drill-down on your pivot table, which will show all items that go into the value on a newly created separate sheet. The drawback to that is that you cna only drill down on one item at a time, and it is a separate sheet. HTH, Bernie MS Excel MVP "James" <an...

Question on the IMF filtering in exchange...
Hey I installed the IMF filter last night and it works great, with one exception. I set both thresholds to the same (5) and got almost all blocked emails into the archive that were junk...So that is good. However I had some users report that there was mail in their junk folder that should have been good Inbox mail. This I undersyand and can live with as folas-positives...the problem is, since both settings on the folter tab were set to 5, how does it know to send the mail to archive rather than Junk folder? Why wouldn't it just send them all to archive if both settings were at ...

AVERAGE issue
Hi, I'm averaging 52 rows which are week totals. I have a result column for the average. Problem: If I have only say 30 of the 52 weeks currently to average, the formula that does my week totals has a zero in the week rows that haven't happened yet, so my running average is way too low due to the zeros. Is there a way to include an if condition for the averaging, like include this row IF the value is greater than zero? Or, is there some simpler way to solve this? I could of course not include the totals formulas until that week has data, which would give me blank cells for unu...

Windows Ultimate/Enterprise 7 issue
I am trying to defrag two drives C & D simultaneously and I would like to know what the full code is to do this from an elevated command prompt in Windows 7 Ultimate/Enterprise? Can anyone help ? I'd ask them here. http://social.answers.microsoft.com/Forums/en-US/category/windows7 -- Regards, Dave Patrick ....Please no email replies - reply in newsgroup. Microsoft Certified Professional Microsoft MVP [Windows] http://www.microsoft.com/protect "42FHMXZ7" wrote: >I am trying to defrag two drives C & D simultaneously and I would like &g...

Filtering without Filter
I just don't get the following. Any ideas? "A" row I have two different values I use: "Contact" and "Not a contact". "B" row I have the person's name (employee). "C" row I have a quantity, just one number. Now what I need is to output quantities of how many Contacts Employee1 or Employee2 or Employee3 have. Also what I need is to get the number of contacts - which can be found on row "C". Should I use COUNT.IF ? Row A can have 2 or more different values so should there be somekind of conditional IF function included? T...

Office 2001 issue
I would like to take information that is updated regularly from Excel and share that information with my document named "Tony report". So when new info is put into Excel it is should automatically updated in document "Tony report". I know this can be done with the Publish and Subscribe commands, but they do not appear in the menus of Microsoft office 2001 for Mac. Is there a way I can still do this? Thanks! Hi Tony, You don't say what kind of document "Tony Report" is, but if it is an HTML document you can use File > Save As Web Page then click th...

Filtering #11
Hi, can ayone tell me how I could do the following in excel 2007 or 2010: Horse Trainer Sam M Jones John M Jones Colin S Attwater Steve J Jackson Brian B Mathers James B Mathers Martin G Raggy Patrick S Thomson What I want to do is filter the dataset on 'Trainer' so that it only shows me the Trainers who feature once in the list. So if I was to do this properly it would only show S Attwater and G Raggy as the other trainers have more than one horse..... Hopefully someone can help because it is driving me crazy !! Thanks David Give this macro a try... Sub HideDuplicateTr...

Junk filter BEFORE other filters?
I am running Outlook 2003 and the Junk filter was working really well. Then I started making other filters...one of them looks for my domain name in the headers and if it's there it moves the email to a folder. Problem is, this filter seems to activate before the junk filter, so the junk sn't being filtered now! How can I set the junk filter to do it's job first and THEN to run my own rules? -- Bryan Anderson <www.anderson-it.com> I created this rule and set it as the first rule to run: Apply this rule after the message arrives with 'X-Spam-Level:******'or'...

Meeting Invitation Issue
Hello, I am stumped on this one... here is a little background information first. At my workplace we are running Exchange Server 2003. We have a user account setup which shares its mailbox to a group of people. This group of people receives mail and sends it on behalf of this user account. This group of people has changed over the past year, people have left, others have come. Now on to the problem: When a meeting request is sent on behalf of this user, and the attendees accept or decline (and choose to send response) a certain group of people are emailed with the response. I am trying...

Pasting into a filtered list
Can anyone tell me if it is possible to paste a list of price updates into a filtered list. - I have filtered the list to show just the products whose prices need to be updated, when I try to paste the updated prices, into the list, the prices are not just pasted into the visible cells but the hidden cells between. Can I paste into the visible cells only or do I have to update each line manually. I am using Excel 2002 Any help would be much appreciated Can you sort the list to bring the products that need updating together in the list? If not, try something like this: Your list of product...

Macro to copy a VLOOKUP formula
Hello, I was wondering if somebody could help me with this macro… I have some data with a filter on, so that only the rows with blank cells are showing. I want to enter a VLOOKUP in the cell, and copy it down to all the blank cells. I tried just recording a macro, but when I run the macro it doesn’t work. Any ideas of how to do it? Example: 1) Before the filter: Colums A -B - C A x x - 1st Row A - 2nd Row A x x - 3rd Row A - 4th row A x x - 5th row 2) After the fil...

IP filtering based on corresponding MX records
Hello Dears, How can I implement the following? Used: Exchange 2003 SP2 in FE/BE configuration; FE is in perimeter zone (capable to “speak” with DNS, BE, DCs and retrieve info) So, somebody connects my FE to sent an e-mail to one of domain users. I need something like that: When connecting, see the “mail from: user@somedomain.xxx”; Verify if there is a record MX for the IP address from which the connection was established in DNS for the domain “somedomain.xxx” If not – drop connection (attention: MX record, not SPF) Is it possible with Exchange 2003 SP2 only? How? Thank you, Alex I be...

Word printing issue
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Hi all, new to MAC, switched from PC to MAC in December 2009. <br> Trying to simulate MS Publisher using MAC Word 2008. <br> Can only seem to get background colours to be effective at Print Preview stage, if I add a background colour in the Word document view first and then switch into Print Preview the background colour has disappeared and the same if I try to Print. <br><br>Any ideas? Check in Word>Preferences>Print>Options for this document only... What is your setting...

apply filter macro
I have a access db that works on win xp but does not work on win 2007 I have a combo box that triggers a apply filter macro using a query sort. no problem on win 2000 or win xp or win 2003 Help AlT ...

Month Filter
I keep a log of checks that I receive in my department throughout the year. I have the checks listed by date (mm/dd/yy), payee, check #, etc. What I want to do is be able to filter the list by month (ex., March 2005). Is there a way to do this? Thanks Joseph You can Try EasyFilter Joseph http://www.rondebruin.nl/easyfilter.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Joseph" <joe@nospam.com> wrote in message news:%23lQNnTawFHA.464@TK2MSFTNGP15.phx.gbl... >I keep a log of checks that I receive in my department throughout the year. I have the checks lis...

Images in tables display issue
When I insert an image into a cell within a table, I always end up with a small white gap between the bottom of the image and the bottom border of the table. This appears only to be an issue with the on-screen display, because when I print out the image the gap isn't there. This is very frustrating, as I spent a very, very long time trying to get rid of this space before I decided to print out the page to make sure it wasn't just an on-screen display issue. Is this a known bug with Windows 2003, or is there something more that I can do to make my on-screen display within...

Using a form in Excel to Filter
I would like to create a form in Excel that is similar to a form in Access. This form will hold all fields on the underlying spreadsheet and enable the user to sort using combo box dropdowns. Ideally, the form would have a button titled RUN that will take all the data the user selects in the combos and filter the underlying spreadsheet. Can this be done?? If so....you will save my life! TIA, Chris Try this Add-in http://www.rondebruin.nl/easyfilter.htm -- Regards Ron de Bruin http://www.rondebruin.nl <ccfatzin@ibtco.com> wrote in message news:1122677766.648239.226910@z14g200...

filter for missing values in a range
I have a list in Col A ( about 2000) one to four digit numbers. I would like to ( for example) , in the 700's be able to filter and find out which of the numbers from 700 to 799 is NOT in the list. I know how to copy and paste to another col, etc. Thanks in advance for the wonderful help all of you give. One play .. Assume your source data runs in A2 down In B2: =IF(ROWS($1:1)+700-1>799,"",IF(ISNUMBER(MATCH(ROWS($1:1)+700-1,A:A,0)),"",ROWS($1:1)+700-1)) Copy B2 down by 100 rows to cover the full spread of numbers to be checked, ie # of nums from s...

filter driver for an USB modem
Hello, I am working on a NDIS filter under Windows 7 64 bits. The filter is working well as NetService Class with classical Ethernet Adapters. But, it does not work with an USB Modem with "Modem" class. Packets handled by the modem are not sent to the filter. How can I get them ? I suspect I should register the driver in another manner. Regards. Eric Boudrand > Packets handled by the modem are not sent to the filter. How can I get = > them ? I suspect I should register the driver in another manner. You need to support PPP in your filter, this requires ...

Filtering
Is there a way to filter messages that contain embedded images? Or even better, messages that only contain embedded images and no text? thanks, Andy andyp@repcmi.com ...

Reverse filter?
Hello, Is there a way to do a "reverse" filter. I'd like to be able to hide or delete rows that match specified criteria. Thank you, Marc Hi Marc, Unfortunately not, but depending on how you are filtering you might be able to use =NOT(oldformula) For the autofilter you might have to use another column (F) F1: 'white -- value of cell you don't want to match F2: =TRIM(F$1)<>TRIM(E2) and fill down --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel...