G
Guest
Can anyone tell me how to create a random generator that will pull from a
table and display specified fields in a form?
table and display specified fields in a form?
lmwib said:Can anyone tell me how to create a random generator that will pull
from a table and display specified fields in a form?
missinglinq via AccessMonster.com said:I had this code squirreled away; I don't usually hold hacks unless
I've tested them, so I think it's viaable.
This SQL will return 10 random records
SELECT TOP 10 Rnd(Len([PrimaryKeyField])) AS
Expr1,YourTable.PrimaryKeyField,
YourTable.Field1,YourTable.Field2,YourTable.Field3
FROMYourTable
ORDER BY Rnd(Len([PrimaryKeyField])) DESC;