Random Number Generation

D

Derek Wittman

Good afternoon,
I'm actually working on a query, but I want to develop a function that
checks a random number for each outputted record in the query...

Here's the question:

I have 5 levels of pick slots in a pick module (1 - 5). I have 4 pick
difficulties based on how high the shelves are... picture a grocery store
with 5 levels of shelves, from the lowest (4 in / 10cm from the floor) to the
highest (5 feet / 1.7m). The levels of difficulty are A - D with A being the
easiest (waist high), B being the shelf levels 1 above AND 1 below the waist,
C being the lowest (at the 10cm mark) and D being the highest (1.7m). So, if
I have 2 sets of B slots, I want to use the rnd() function to determine if B
is above or below the waist.


5 --> D
4 --> B
3 --> A
2 --> B
1 --> C

I realize that, statistically, I should have 50% of my Bs on Shelf 4 and the
other 50% on Shelf 2. That's what I want. But I want it to be Random, and
not programmed arbitrarily. The crux is that I would like each record to be
different - and I would 'prefer' not to use recordsets. Is there another
solution available?

Thank you in advance!
Derek
 

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

Top