?
Solved

Exclude some records from report based on sku #

Posted on 2007-03-27
4
Medium Priority
?
483 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 500 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 500 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

770 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