MS Access: Group By: Allow random selection of value in a field

  • Thread starter Jacob from EurekaFacts
  • Start date
J

Jacob from EurekaFacts

In a group by query, allow for option in the "Total" row for random selection.

I.e. Access will choose a random value from a grouped field.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...a814670089&dg=microsoft.public.access.queries
 
P

Phil

In other words, with things like this in the TOTAL row,

FIRST, (find the first value of the group)
LAST, (find the last value of the group)

You are looking for effectively
RANDOM, (find a random value of the group)

The easiest way I could think of would be to add one more field to the
underlying query (if you are using a table, just create a query from
that table), Selector:RND(), and then use FIRST or LAST on that field.

Make sense?

Phil
 
Top