T
TC
Randomize() ?
^^^
TC
^^^
TC
JSand42737 said:=?Utf-8?B?UmVuZQ==?= said:We have recently put into affect random drug testing. Is there was way to
have Access pick 2% of employees monthly to be called in.
Can this be done in a report of some type?
Assuming that you want a random 2% of employees each month, regardless of
whether they have been tested in the previous month, then you need to create a
query to select 2% at random. The Access Web has a page showing you how to
select records at random from a table at
http://www.mvps.org/access/queries/qry0011.htm, except your SQL will ook like:
SELECT TOP 2 PERCENT * FROM tblEmployee
WHERE Randomizer()=0
ORDER BY Rnd([FieldPK]);
--
Jon
www.applecore99.com - Access Tips and Tricks