Forum Discussion
AdamArends
Feb 27, 2023Copper Contributor
Non-Repeating random between per unique ID
Hello
Per this solution (here), can it be brought into Access... The memory Limit of the machine means I cannot run the macro in Excel. It works on a limited number of records.
Basically, for each line where the trans_id is the same, I need a non-repeating random number between 1 and 25 (e.g. 1000129 would have 4 unique numbers between 1 and 25).
Thanks
- arnel_gpSteel Contributor
here is a demo db.
open form1.
on design view, see the Code on the Click event of the button.
also see modRandBetween.
- George_HepworthSilver ContributorWhat part would you like help with? You've stated a requirement. Is it your plan to have some create a VBA function for you, or propose a SQL solution?
- AdamArendsCopper Contributor
George_Hepworth Hey, thanks for the response. I would take either, really. If there is a for each SQL statement that works, that would be fine and less coding to deal with.
Thanks
- George_HepworthSilver Contributor
For starters, see how well the ranking queries explained here can handle your requirement.