Solved

Exclude some records from report based on sku #

Posted on 2007-03-27
4
478 Views
Last Modified: 2013-11-28
I have a table called WebProducts with 250-300 records.  I want to exclude some records based on their product sku #.from the printed report.  This list of excluded records will change from time to time.   I would like to design a query that would specify which records to skip when report is printed.

Example:   iif([sku#] = 'ab003' or [sku#] = 'de003',skip,print).  About 5% of records will be skipped.  There is no other criterea, like if [color] = 'blue'
Thanks

David
0
Comment
Question by:DavidDF1913
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 39

Accepted Solution

by:
stevbe earned 125 total points
ID: 18801789
make an exception table for just that list of SKUs and then use a Not IN(SELECT Sku# FROM tblException) as part of your report's query criteria
0
 
LVL 38

Assisted Solution

by:Jim P.
Jim P. earned 125 total points
ID: 18801799
I would create a table of like SKUs_To_Skip. Populate this table with the SKU # you don't want  to print.

Then your report is based on a query like:
SELECT *
FROM WebProducts
WHERE [sku#] Not In (SELECT Sku_Num FROM SKUs_To_Skip)
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 18801826
<Naming Conventions>
Using spaces and special characters like the pound sign (#) in field names causes no end of problems. Even though M$ says you can, doesn't mean you should.
</Naming Conventions>
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 20013302
Glad to be of assistance. May all your days get brighter and brighter.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question