random sampling in Access 2003

  • Thread starter Thread starter Ginnyzz
  • Start date Start date
G

Ginnyzz

I have a table of 618 medical patients, I want to select a random sample of 70.
How do I set this up in Access?
 
You can use a simple Top Query. Something like this:

SELECT TOP 70 * from PatientTable Order By Rnd(PatientID)

(Of course, replace PatientTable with your table name and PatientID with
your actual patient identifier field)

On my website (www.rogersaccesslibrary.com), is a small Access database
sample called "TopQuery.doc" which illustrates how to do this. You can find
it here: http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=233

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
I'll try this out..thank you!

Roger Carlson said:
You can use a simple Top Query. Something like this:

SELECT TOP 70 * from PatientTable Order By Rnd(PatientID)

(Of course, replace PatientTable with your table name and PatientID with
your actual patient identifier field)

On my website (www.rogersaccesslibrary.com), is a small Access database
sample called "TopQuery.doc" which illustrates how to do this. You can find
it here: http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=233

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
Back
Top