Random selection from large data set (1 Viewer)

ScottBeatty

Registered User.
Local time
Today, 11:40
Joined
May 31, 2013
Messages
65
I have a question about something on my database that I do not even know if it's possible or not, but I figured it's worth a shot.

I pulled a report from this website my company uses and it has around 7,000 orders and a corresponding employee to each record. Since each employee has around 20-50 orders, I was wondering if there was a VBA code or different Access tool to randomly select only 2 orders from each employee, thus reducing the data set from 7,000 to a more manageable number?

Any help would be much appreciated. Thanks

Scott
 

rzw0wr

I will always be a newbie
Local time
Today, 11:40
Joined
Apr 1, 2012
Messages
489
Try the Rnd(number) function.

Dale
 

DavidAtWork

Registered User.
Local time
Today, 16:40
Joined
Oct 25, 2011
Messages
699
Look in the help for the Rondomize statement, it's quite straightforward to use, you just need to think how you can apply a randomly generated number as way of selecting an order

David
 

Mihail

Registered User.
Local time
Today, 18:40
Joined
Jan 22, 2011
Messages
2,373
Can you show as the structure ? Tables, Fields, Relationships ?
I'm pretty sure that that can be done.
 

smithdavid

Registered User.
Local time
Today, 08:40
Joined
Jun 26, 2013
Messages
13
Use Rnd(FieldValue) function to retrieve random values.
 

Users who are viewing this thread

Top Bottom