random select query

  • Thread starter Thread starter Guest
  • Start date Start date
Well you could make a function whereby you use your record_id as source value.
Code below is not tested but give you some ideas. also don't forget to play
with the upperbound value.

- Raoul


e.g.

Public Function IncludeRecord(ID as long) as boolean
dim upperbound as integer
dim lowerbound as integer
dim RandomValue as integer

Randomize
upperbound=99
lowerbound=0
RandomValue=Int((upperbound - lowerbound + 1) * Rnd + lowerbound)
IncludeRecord= ((ID mod upperbound+1)=randomvalue)

End Function
 
Back
Top