Random Sampling of Information to Display in Access 2K2 Reports

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

**Using Windows 2K with Office XP**
I am pulling reports from read-only tables. Report shows a breakdown of
accounts created in individual branches by regional office, district office
and branch. My task is to acquire a random sampling of files from each
branch to audit. I have built the report to show me all accounts as stated
above, but I would rather have access generate the files I need to audit.
How can I get my report to show me just 1-3 files from each branch, without
pulling too many from one or another branch? Thanks.
 
Use rnd function (see help in vb for access - Controlg to
open a code module and help from there).

Int((upperbound - lowerbound + 1) * Rnd + lowerbound)

upperbound should be the maximum number of your account
number
lowerbound should be the minimum number of your account
number

dmin and dmax functions should be able to return the
account numbers required to populate upperbound and
lowerbound.

Use these in the criteria of your query 2 or 3 times to
return 2 or 3 random records.

NOTE:
This assumes that account numbers are continuous with no
breaks.

HTH,

Terry
 
Back
Top