Results 1 to 4 of 4
  1. #1
    Frannilea is offline Novice
    Windows 10 Access 2007
    Join Date
    Jul 2020
    Posts
    27

    Question Shuffle/Sort table order when opening form

    Hi.



    I'm a beginner to Access. I'm trying to make a database for language learning. I want to have about 100 words (give or take) that I'm learning at any one time. I have a table with the fields: ID, EnglishWord, KoreanWord, SoundFileLink, DateLearned, NumberRelearns, Comments, TimesSuccessful. The KoreanWord field is an automatic Korean typing field. The SoundFileLink is an mp3 link to a folder on my computer, Number of Relearns is just the number of times I have the word on my list to relearn (I often forget words), Comments is just a memo for notes, Times Successful is a field that I want to increment each time I get the word successfully (at a certain number I'll consider the word learned, at which point I'll no longer want that particular record included in my random list each day.).

    What I want to do is, when I open my form to practice I want it to create a random list of my table (a random QUERY on ID fed into an array??), excluding learned words, so that each day I practice I get a different appearance order, every record only comes up once for that form, and stops with a message once I have finished. I also want a total count of the number of records on the list each day, so that I know how many I'm learning, and can add more when required.

    I also want to then replicate a similar senario for the opposite side of the card (English to Korean - speaking).

    I've successfully created the form. It has a button that plays the sound file and the English Word/Korean Word displays when I click on the field (the font colour changes), for if I need to see it.

    I've found this: SELECT * FROM MyTable ORDER BY Rnd(MyTable.MyID), but I don't know how to code it into a way that will shuffle my table temporarily for me each day.

    Could someone please help me with the code? I've tried unsuccessfully to find a simple program that does this, and tried it with PowerPoint, but 100 slides on PowerPoint is simply too many and the program freezes at the 68th slide each time.

    Thanks in advance! :-)
    Attached Files Attached Files

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Have a look and see if that is what you want . Open the record source for the form and look at the query properties. It is a Top 3 query meaning it returns the top three random IDs for the records that have <3 Times Successfully Done. You can modify these two parameters to suit your needs.

    Cheers,
    Vlad
    Attached Files Attached Files
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #3
    Frannilea is offline Novice
    Windows 10 Access 2007
    Join Date
    Jul 2020
    Posts
    27
    Yay! Thank you so much! Sorry for the late reply. I gave up last night and went to bed, and found your post this morning (and had to search for the query record). That's exactly what I need. So all I need to do is to change the top 3 to "all" and the number of times successfully done! Awesome! I did do a little programming in Access about 12 years ago, but have forgotten most of it - even where everything is. Some of it is coming back. I'd totally forgotten about this query window. I'm a teacher now in South Korea and learning Korean, and mostly doing a very beginner basic PowerPoint stuff for my kids (random slides and spinners and games etc). I should get back into programming a little. Who knows what other little projects I might think up?

    Now I can pretty it up a little and add all word data to my table.

    You have my eternal gratitude!

    A very grateful dedicated teacher! :-)

  4. #4
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Glad to help! If you change the Top to All the query will return all records from the table, but maybe that is what you needed.

    Cheers,
    Vlad
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

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

Similar Threads

  1. Replies: 5
    Last Post: 08-27-2019, 08:41 AM
  2. Replies: 3
    Last Post: 06-09-2019, 08:02 PM
  3. Strange sort order of records on a form.
    By Miles R in forum Forms
    Replies: 5
    Last Post: 03-27-2019, 02:06 PM
  4. Sort order in a sub form
    By roar58 in forum Forms
    Replies: 1
    Last Post: 03-17-2012, 08:57 PM
  5. Access 2003, sort order property of a form
    By Rick West in forum Forms
    Replies: 11
    Last Post: 09-17-2009, 08:28 PM

Tags for this Thread

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