Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Oct 2001
    Location
    Suffolk, England
    Posts
    134
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Random number (Access 2000)

    How can I a generate a list of 36 random numbers between 37 and 72 - BUT they all must be different - and I want to be able to shuffle this list.
    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Random number (Access 2000)

    Where do you want these numbers? Do you want to have a table with 36 records, or do you want them in an array in Visual Basic, or ?

  3. #3
    2 Star Lounger
    Join Date
    Oct 2001
    Location
    Suffolk, England
    Posts
    134
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Random number (Access 2000)

    I do have a table with 36 records - all with a unique ID number - but I want to change the ID randomly - putting the new number in an array will do fine
    Thanks

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Random number (Access 2000)

    The attached database contains a module basShuffle. The ShuffleIDs procedure reads IDs from a table and produces an array with shuffled IDs. The Test procedure shows how to call it.

    I hope you can use the code as a starting point. (You can't do much with it "as is")

  5. #5
    2 Star Lounger
    Join Date
    Oct 2001
    Location
    Suffolk, England
    Posts
    134
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Random number (Access 2000)

    thanks - That looks as though it's just what I want!
    Allison

Posting Permissions

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