how do I let a form automatically play music when opening?

  • Thread starter Thread starter anco
  • Start date Start date
A

anco

I made a formin Access 2007 with a MIDI-file that I would like to play
automatically as soon as the form opens.
 
Hi Allen,
Thanks for your answer. I want to play the music when a splashscreen (form)
opens.
I've tried your code but get an error message with the second line.(invalid
expression).
Do I have to fill in the filename(path and filename?), where the code says
filename?
I'm sorry, Im not much of a programmer yet. Plse help.
 
Did you put this code into a standard module (not the module of a form)?

It works fine there.

The first line ends with an underscore character. Be sure to include that.

(I have not tested it with a 64-bit version of Windows.)
 
Hi Allen,

It worked!! THANKS.

One last question: how do you stop the music fromplaying when the form closes?
 
You could probably keep track of the process you started with the API call
and terminate it, but I've not experimented.

Like I said, I'm not keen on software that does this. It fights with
smoothjazz.com or whatever I have playing. :-)
 
Back
Top