Results 1 to 3 of 3
  1. #1
    FormerJarHead is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    52

    Returning Random Records


    Hi all,
    I'm sure the topic of random records has made the rounds and I haven't been able to find anything on my particular question so I thought I would ask. I want to perform cycle counts in the warehouse. I'm using a simple query mainly because I don't know how to write VBA or SQL. What seems to happen is every time the database is opened initially, the same group of records are displayed. I've added a command button to the form so staff know to click the button before a count form is printed, but I was hoping to find a way to set the query to load a fresh set of records each time the db is opened. In the OnLoad, I tried a couple simple DoCmd.Requery and DoCmd.GoToRecord acDataform, "Cycle Counts",acNewRecord with no luck so any suggestions will be appreciated. I've also added my query in the remote case I can do a simple fix...

    Thank you for any suggestions...
    Attached Files Attached Files

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    I had a field for SortBy,
    an update query set it with Rnd() function.
    then display them in sortBy order

  3. #3
    FormerJarHead is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    52
    Quote Originally Posted by ranman256 View Post
    I had a field for SortBy,
    an update query set it with Rnd() function.
    then display them in sortBy order
    Now I'm more confused...I need to create an update query with a SortBy field? Use the Rnd() function in criteria?

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

Similar Threads

  1. Replies: 2
    Last Post: 05-29-2015, 11:16 AM
  2. Replies: 2
    Last Post: 03-05-2015, 01:43 PM
  3. Return Random Records
    By cbrsix in forum Programming
    Replies: 1
    Last Post: 01-11-2013, 06:13 PM
  4. Problem with code of random assignment of records
    By lios1984 in forum Programming
    Replies: 13
    Last Post: 04-17-2012, 11:02 PM
  5. Select Random Records Based on Conditions
    By access123 in forum Queries
    Replies: 1
    Last Post: 10-27-2010, 10:25 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