Results 1 to 2 of 2
  1. #1
    Gdm is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    May 2010
    Posts
    28

    Question How to use Rnd to order records?

    I've tried unsuccessfully to get Access to order records based on a field in a query that uses Rnd() function.

    Here is an example of my unsuccessful attempt:

    SELECT * FROM (SELECT field1, field2, Rnd(field3+Time()) * 1000 + 1 AS DspField3Order, field4 AS TempSelect)


    TempSelect ORDER BY DspField3Order

    I get pseudo-random numbers for DspField3Order on each record, but Acces does not order by them.
    Is there a way to make this work?

    Thank you.

    Gdm.

  2. #2
    Gdm is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    May 2010
    Posts
    28
    I found a solution. Do not include the Rnd() in the SELECT statement, only in the ORDER BY.

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

Similar Threads

  1. Replies: 15
    Last Post: 10-01-2015, 10:06 AM
  2. Order by
    By cowboy in forum Access
    Replies: 2
    Last Post: 05-03-2010, 05:04 PM
  3. Records change order
    By accessbeginner in forum Access
    Replies: 1
    Last Post: 03-18-2010, 06:38 PM
  4. Tabbing order
    By emccalment in forum Forms
    Replies: 1
    Last Post: 02-18-2010, 10:58 AM
  5. Chart Order
    By protean_being in forum Reports
    Replies: 0
    Last Post: 06-19-2008, 09:26 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