Search for Same Criteria Multiple times

  • Thread starter Thread starter pcarperutk
  • Start date Start date
P

pcarperutk

I'm making a Cut list for a Department for materials based off a
Product ID. When I enter all my Product ID numbers into the Criteria I
want the materials for, if I have 2 Product ID's....Access groups them
into one ID when I run the Query.

Ex:
Field: Product ID
Table: Product
Total: Group By
Sort: Ascending
Criteria: 5 OR 6 OR 12 OR 12 OR 7

I get the parts I need for 5, 6, 7, and 12 but only parts for one 12.
How would I write an expression to receive duplicates without having to
change all my relationships and primary keys?
 
It has nothing to do with relationships and primary keys.
You are using a totals query and so it rolls everything that is alike
together. Change the query to a select query.
 
The database uses the criteria to identify which records to return. It
doesn't use criteria to decide how many of each record to return.

If you say I want all records with 12 and then you repeat that statement (I
want all records with 12), you are going to get all records with 12 but only
once.

To do what you want you would need some method of specifying the number of
twelves you wanted. And by default the number of fives, sixes, and sevens.
A pretty problem that I don't see the solution for. I'm sure it can be
done, but it would probably involve adding an additional table or fields to
an existing table - depending on your table structure.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top