Results 1 to 2 of 2
  1. #1
    Delta223 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    38

    Query that displays fixed # of results randomly?

    Hi,

    I have a simply query that returns data from a single table (& no calculations or anything complex) The table has only abut 15 entries and the query displays the same 15.



    I would like the query to randomly select & display 5 of the entries. Is there any easy way to do this?

    Thanks

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    see something like: http://www.databasedev.co.uk/random_query.html

    I also write for that website. It's probably a good tutorial. Also, you're going to want to use 'SELECT TOP 5' in your statement, combined with the RND() function, as illustated in that article.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 05-14-2012, 07:24 AM
  2. Replies: 2
    Last Post: 01-05-2011, 11:29 PM
  3. export query to fixed width text
    By eladz949 in forum Import/Export Data
    Replies: 5
    Last Post: 01-01-2011, 03:28 PM
  4. Replies: 3
    Last Post: 11-24-2010, 06:33 PM
  5. Replies: 1
    Last Post: 10-28-2009, 11:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums