Results 1 to 3 of 3
  1. #1
    BatmanMR287 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jan 2014
    Posts
    69

    randomizing statments on report

    I have a report that has 42 questions. Each question has up to 8 comments made by a maximum of 8 people. On the report the question appears then the comments for that question(max 8). I need to randomize the order that the comments appear from question to question. What would be the best way to do this?

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    8,275
    in an update table assign the field that has the random number using this function:
    give the table name in the function.

    usage: RandomizeRecs ("tMytable")

    Code:
        'this code marks random nums to records
    
    Public function RandomizeRecs(byval pvTbl)as long
    Dim iTotal As Long
    
    iTotal = dcount("*",pvTbl) * 2
    RandomizeRecs = Int(iTotal * Rnd + 1)
    
    End function

  3. #3
    BatmanMR287 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jan 2014
    Posts
    69
    Decided to go a different route, thank you though!

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

Similar Threads

  1. Randomizing based on criteria
    By webisti in forum Access
    Replies: 8
    Last Post: 12-18-2013, 11:29 AM
  2. If statments??!!
    By wmagargle in forum Programming
    Replies: 4
    Last Post: 08-30-2012, 02:45 PM

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 - Senior Forums