I am attaching a sample database.
I tried to mock-up your situation by setting up table with 2 fields recordid and xtrafield.
RecordId simulates your recordid (record identifier) and
xtrafield is where I record a random number.
I created the table, then populated it with routine MakeRecords in module1.
I then ran routine dgScottStuff in module1. This routine populates or repopulates the value in xtrafield with a random number.
Query, QueryToGetRandomRecords with sql
Code:
SELECT SubQuery.recordID
FROM (
SELECT TOP 10 tblSampleRecords.RecordID
,tblSampleRecords.xtrafield
FROM tblSampleRecords
GROUP BY tblSampleRecords.RecordID
,tblSampleRecords.xtrafield
ORDER BY tblSampleRecords.xtrafield
) AS SubQuery
ORDER BY SubQuery.recordID;
Selects 10 random records from the table.
You can repopulate the xtrafield by running dgScottStuff at any time. This will assign different(very high probability) random numbers to xtrafield, and the select top 10 would result in a different set of records (with some probability of repeats).
Good luck