You would need to do something like this:
As far as getting a random number, I would refer to the AutoNumber field, which I am assuming is there.
Then take the MAX() value of the ID field as the upper bound of the random number generator. Use 1 for the lower bound.
Then using a target table to store the individual records as they are pulled (with a delete query to delete all the data before each run), do something like this (psuedo code):
--------------------
Using an input box, take the number of records in the sample (iCount)
iCount = InputBox("Enter a quantity of records to view")
Let's say 50 is entered
Take the highest ID field number (iMax)
iScope is your random number that will call the ID field
Randomize
Do Until i = iCount + 1
iScope = Int((1 * Rnd) + iMax)
On Error Resume Next
Err.Clear
sSQL = "SELECT * FROM tblMain WHERE [IDField] = " & iScope
open recordset
If there is an error, then skip
If Err = 0 Then
Move the record to the target table
End If
i = i + 1
Loop
Then open the resulting table with a form or report.
-------------------------------
Did that help?
This should work. Let me know if iScope keeps returning the same initial number, which it shouldn't do.
mmcdonal
Look it up at:
http://wrox.books24x7.com