Select random (unique) records

leejevans

New member
Local time
Today, 11:49
Joined
Nov 22, 2006
Messages
8
Hi

I am attempting to setup a database that will allow my organisation to select contractors to invite to tender for work.

The contractors must be selected at random to ensure fairness.

I have a command button - "Generate List" when this is clicked it runs a query which selects five random records from my tblContractors table and appends them to tblLists table. My problem is that if a contractor declines to tender we may wish to choose another 1,2,3 contractor(s). I thought maybe there could be a button "Add Contractor" which would add an additional contractor from tblContractors into tblList each time it is clicked. I can manage this, however I want to make sure that the contractor is not already in tblList before adding them again which could happen with random records!

Any suggestions on how the append query could stop upon finding the contractor already present and then select another one automatically?

I hope this makes sense!

Cheers
Lee
 
Can you just select say 10 contractors at random then use the top 3. Then the other 7 would be alternates?
 
Can you just select say 10 contractors at random then use the top 3. Then the other 7 would be alternates?

Now that is a simple, but excellent solutioN!
 

Users who are viewing this thread

Back
Top Bottom