Random Select Help

Gootz11

Registered User.
Local time
Today, 14:43
Joined
Apr 5, 2002
Messages
47
Hello,
I currently have a query that randomly selects 100 records from a table.
My SQL statement looks like this:
SELECT TOP 100 *
FROM [X1A Pick Slots]
ORDER BY Rnd(asc([slot]));

I'm trying to change my statement so that i can enter the number of records i want to select every time i run the query.
Please Help
Thanks in Advance
JG
 
Haven't tried this myself, but have you tried using a parameter query like this:
SELECT TOP [Enter the number of records to select: ] *
FROM [X1A Pick Slots]
ORDER BY Rnd(asc([slot]));
 
Yeah, i tried the parameter statement but it didn't work. any other ideas???
Thanks
 
If that's not working, the only other thing I can think of is using a pop-up form to let the user input the number of records desired.
 

Users who are viewing this thread

Back
Top Bottom