Pull a random number more often

Joined
Jun 25, 2012
Messages
2
Reaction score
0
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
 

Attachments

  • NMI Inventory Counting Database Final.zip
    223.5 KB · Views: 111

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

Similar Threads

Truly Random Numbers 10
random numbers 3
random number generation help 3
Random number again 8
Random Function Problem 2
Random number 4
Old address information updated to current addressi 1
weighted numbers macro 0

Top