Multiple Filter Conditions

Swift_74d

Board Regular
Joined
Aug 19, 2009
Messages
148
I'm currently trying to streamline a chain of queries in a database and could use some imput. As it stands right now the first two queries are independant, one pulls information from a form, and another from a table. The third query (the current problem query) is where they are combined and filtered. After some trial and error i've found that the filter slows down the query signifigantly (difference between a few minutes (5-6) and a second) and began to wonder if i'm going about this the right way.

The current filter...
Code:
Filter: IIf([Month1Cost]<>0 Or [Month2Cost]<>0 Or [Month3Cost]<>0 Or [ClaimStatus] = "Open","True","False")

Criteria is set for "True"

Month1..3Cost is calculated in the third query and uses variables from the form and table query. Claim Status comes from the table query.
I basically need to show only records that have any costs associated to them for the three month period or are still in an open status.

Is this the right way to go about this or is there a more efficient method that i'm not aware of?

It may also be important to note that there is another field in the query that is pulled from the table query and filtered by a field from the form query. I've already duplicated the problem query (one for each filter), but it doesn't make a difference thats noticible in the slightest.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Because it won't let me edit the op....


Month1..3Cost is calculated in the third query and uses variables from the form and table query. Claim Status comes from the table query.
I basically need to show only records that have any costs associated to them for the three month period or are still in an open status.

Month1...3Cost is actually calculated in the form query.
 
Upvote 0

Forum statistics

Threads
1,224,560
Messages
6,179,520
Members
452,922
Latest member
nstaab07

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