Results 1 to 3 of 3
  1. #1
    wengang1 is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Oct 2021
    Posts
    1

    playing audio from Access form is interfering with click events

    Hi all.
    I've done a lot with Access forms in recent years, but I don't often work with sound.
    I wanted an Access form with some buttons to click and the ability to play audio files, to which the user clicks various buttons.
    I started out with PlaySound and wav files, but there was some unpredictable behavior.
    I switched to the Windows Media Player ActiveX control and MP3 files, but there is also unpredictable behavior.



    Essentially, the click events of the buttons stops responding, then some of the Dimensioned variables are cleared from memory.
    I've seen Access clear variables before, but I don't understand what is making click events not fire.

    I know this is generic and no code provided, but what are the possibilities?
    I remember vaguely a database once where error messages were permanently disabled somehow and nothing would make an error pop up, so the VBA would just continue onward executing code as if the error didn't happen.
    I combed through that code numerous times and never saw what caused it. Just wondering if this is a case where an error is causing the events to be skipped, and I'm just not seeing the error.

    On a related note, what way is there to prevent variables from being cleared? I Dim them at the top of the VBA editor as usual, not sure what makes them clear out sometimes.

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Try playing the audio files asynchronously.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    JasonH is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2021
    Posts
    2

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

Similar Threads

  1. on click events not working.
    By Synergy.ron@gmail.com in forum Forms
    Replies: 1
    Last Post: 10-01-2021, 06:33 PM
  2. Replies: 2
    Last Post: 06-10-2019, 02:25 PM
  3. Replies: 6
    Last Post: 05-08-2019, 03:25 PM
  4. vba click events
    By bilalo in forum Programming
    Replies: 8
    Last Post: 01-31-2019, 02:35 PM
  5. Replies: 3
    Last Post: 03-13-2017, 10:27 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