=RAND(-1) && Initialize to system clock SELECT table COUNT TO nMaxValue FOR !DELETED() nWinnerRecord=INT(1+RAND()*nMaxValue) GO nWinnerRecord && This is the winning record>>Our company is creating a sweepstakes application that will randomly select a winner each month. We are having difficulty putting code together that will help us select a winner. We are using one table that has two fields in it. A three letter code (AFS) field and a dateime field. Does anyone have any simple code that might be helpful in selecting a winner or have any ideas on how to generate a winner.