Solved

Exclude some records from report based on sku #

Posted on 2007-03-27
4
465 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
  • 3
4 Comments
 
LVL 39

Accepted Solution

by:
stevbe earned 125 total points
Comment Utility
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
Comment Utility
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.
Comment Utility
<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.
Comment Utility
Glad to be of assistance. May all your days get brighter and brighter.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

728 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now