Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2009

    Unanswered: selecting randomly and assigning names

    i have a table with distinct card numbers and their card types.
    i want to randomly select the card numbers and assign them with manager names,teh names should be assigned randomnly and evenly.
    all this needs to be done on ms-access.
    iam new can anyone please help me?

  2. #2
    Join Date
    Feb 2004


    Generally, when I do this, i make a query counting the number of accounts assigned to each manager, then I query out the the lowest one in a top 1 query. Then you make a query of all accounts that do not have a manager tied to it and make a top 1 query of it. This query will be an update query and you will update this with the value from the top 1 manager query from above. Rinse and repeat until all unassigned accounts are now assigned. You can code this cycle as many times as there are unassigned accounts in your vb code fairly easy or you can put it in a macro and set it to repeat. The code is more efficient though.

    Good luck
    You know, I'm sick of following my dreams, man. I'm just going to ask where they're going and hook up with 'em later

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts