If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Query criteria based on table entries
I have a report based on a query to report our "10 worst" customers based on
a couple of factors. Certain customers however are just buying our off quality products at cheap prices, and should not be included in our "10 worst" analysis. I have added "Not In ("custname1","custname2" and so on) to my query criteria line and that works fine, but for future ease of upkeep I thought I would make a table of customers to not include in the "10 worst" query and reference that, however I cannot get it to work so far. How do I reference the table in my "Not In ( )" criteria area or can that even be done? |
#2
|
|||
|
|||
Query criteria based on table entries
Do not use the 'Not In'. In design view add the table that list the
Customers to omit. The table needs to have two fields, the second to flag without having to add and remove as things change and include ALL customers. Join on the CustomerID. Add the flag field in the Field row of the grid. In the criteria row use value to allow query to pull those records you want. -- Build a little, test a little. "Robbro" wrote: I have a report based on a query to report our "10 worst" customers based on a couple of factors. Certain customers however are just buying our off quality products at cheap prices, and should not be included in our "10 worst" analysis. I have added "Not In ("custname1","custname2" and so on) to my query criteria line and that works fine, but for future ease of upkeep I thought I would make a table of customers to not include in the "10 worst" query and reference that, however I cannot get it to work so far. How do I reference the table in my "Not In ( )" criteria area or can that even be done? |
#3
|
|||
|
|||
Query criteria based on table entries
Robbro wrote:
I have a report based on a query to report our "10 worst" customers based on a couple of factors. Certain customers however are just buying our off quality products at cheap prices, and should not be included in our "10 worst" analysis. I have added "Not In ("custname1","custname2" and so on) to my query criteria line and that works fine, but for future ease of upkeep I thought I would make a table of customers to not include in the "10 worst" query and reference that, however I cannot get it to work so far. How do I reference the table in my "Not In ( )" criteria area or can that even be done? NOT IN (SELECT CustID FROM tblExceptions....) -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...eries/201004/1 |
Thread Tools | |
Display Modes | |
|
|