irsmalik,
In general (and I'm not going to build this for you), in your Plots table, add a field for "Matched" and in your Customers Table add a field for "Matched". These would be Yes/No fields.
When you are "balloting" off your plots (in the U.S. we would use the word "raffle" or "lottery"), in your queries:
For the Lots:
- SELECT LotNumber
-
FROM tblLots
-
WHERE NOT Matched;
For the Customers:
- SELECT Customer
-
FROM tblCustomers
-
WHERE NOT Matched;
Using both recordsets, find out the number of records, generate a random number based upon the number of records for each recordset. Then, RandomLotNumber gets matched to RandomCustomerNumber, update both of those records to
Matched = True
.
Repeat until there are no more lots. Your actual project will be not much more involved than that. You will just need to keep track of which customer is matched with which lot.
Hope this hepps!