By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,456 Members | 1,505 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,456 IT Pros & Developers. It's quick & easy.

reselect random items

P: n/a
d4m
I have a SQL/VBA statement (below) that will randomly select names. It
checks against another database so that a name is not selected twice.
(Works Fine)

SQL = "INSERT INTO Names ( Name, Position, [Date Hired] ) " & _
"SELECT TOP 5 New_Names.Names, New_Names.Postion, [Date
Hired] FROM New_Names" & _
"WHERE (((New_Names.Names) Not In (SELECT Names FROM
Names))) ORDER BY Rnd(Len([Names]));"
The problem now is all names have been selected at least once. I need
to start the cycle all over again but don't want to delete any of the
names already selected. I'm sure I need to add some sort of a counter
but not sure how to do it.

Thanks for any suggestions.

Jan 3 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.