qryRandom

  • Thread starter Thread starter Teddy
  • Start date Start date
T

Teddy

I am creating a query called qryRandom I want it to display one random record
from tblRandom, each time I execute it. Do you know what I need to do with
qryRandom in design view in order to make that happen?
 
Teddy said:
I am creating a query called qryRandom I want it to display one random record
from tblRandom, each time I execute it. Do you know what I need to do with
qryRandom in design view in order to make that happen?

If you can arrange to execute the VBA statement:
RandomIze
before running the query, then you can use the query:

SELECT TOP 1 table.*
FROM table
ORDER BY rnd(), PKfield DESC
 
Back
Top