I have made a database in access to randomly pick numbers. The only only problem is that I want to weight certain types of part numbers by a field called P/N class. My query spits out the example below. Every time I run it I get different results which is what I want.
Example: Product Number.....P/N Class
102BD5-CS2-ZN1....................a
5410CV-PL2-AL1....................c
11738-LW-SS2.......................c
125200002BD3-SS1-EP..........a
222070BD2-1-CS1-ZN1...........a
The part numbers I store in my table have either a class of A, B, C or D. I would like to weight A as 90-95% picked, B as 80-85%, C as 25-30 and D as 20-25.
The goal for my database is to NOT change my data in the table and use some kind of code to pull certain types of product numbers. I have experimented in VBA in modules, SQL in queries and macros but I still have not solve my issue of weighting.
If anyone knows a better overall database solution than using Access I will listen. The main purpose for my project is to pull five random part numbers having more A's and B's than C's and D's in each group of five. I would love it if I could hit print once and three groups of five results are on one page with the signatures and dates included(see attachment) and I print ten total pages most part numbers being different. I would be cutting each group of five on the dotted line and handing them to someone to check and mark inventory counts.
Let me know if you can help me out.
Michael
Example: Product Number.....P/N Class
102BD5-CS2-ZN1....................a
5410CV-PL2-AL1....................c
11738-LW-SS2.......................c
125200002BD3-SS1-EP..........a
222070BD2-1-CS1-ZN1...........a
The part numbers I store in my table have either a class of A, B, C or D. I would like to weight A as 90-95% picked, B as 80-85%, C as 25-30 and D as 20-25.
The goal for my database is to NOT change my data in the table and use some kind of code to pull certain types of product numbers. I have experimented in VBA in modules, SQL in queries and macros but I still have not solve my issue of weighting.
If anyone knows a better overall database solution than using Access I will listen. The main purpose for my project is to pull five random part numbers having more A's and B's than C's and D's in each group of five. I would love it if I could hit print once and three groups of five results are on one page with the signatures and dates included(see attachment) and I print ten total pages most part numbers being different. I would be cutting each group of five on the dotted line and handing them to someone to check and mark inventory counts.
Let me know if you can help me out.
Michael