qryRandom

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?
 
M

Marshall Barton

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top