Hi again,
Thanks but playaudio.zip didn't work for me. For some reason I cannot put a wmp control in my form (Access locks up when I try) and I think this example requires that there is such a control. It wouldn't work anyway..
What is really confusing is that if I hard code the path to the wav file it works brilliantly, without opening wmp. For example:
Public Sub PlayWaveFile_Cord()
Call PlayWaveFile("S:\SFX\robot.wav")
End Sub
....works great. But if I have a text box in a form showing the path to the wav file (from a table) it doesn't work - I just get the Windows error sound..
ie: textbox name is hyperlink:
Public Sub PlayWaveFile_Cord()
Call PlayWaveFile("hyperlink")
'or Call PlayWaveFile("me.hyperlink")
'or Call PlayWaveFile("[forms]![form1].hyperlink")
'tried several strings because being an idiot I have to..
End Sub
Alternatively, I could just click on the control 'hyperlink' in the form and this will actually open wmp and play the wavfile, but not until after a really annoying "some files can harm your computer/virus warning" type message which requires another 'OK' mouse click. As I will want to audition several sounds in quick succession I don't want to have to keep closing this annoying message box. Also, I like the way that the first example code doesn't actually open wmp and take the focus away from Access, it just plays the wav file....
Can anyone help me?