adding wav file to a msg box

k983111

Registered User.
Local time
Today, 04:43
Joined
Aug 21, 2002
Messages
36
Can someone please tell me if it is possible to get a wav file to play when my msg box pops up?. My code is

If DCount("[Spec]", "Stolen", "[BoxNo] = '" & Me.BoxNo & "' And [SpecCode] = '" & Me.SpecCode & "'") = 1 Then
MsgBox "STOLEN BOX!. This box is on the Stolen List"
Cancel = True
Me.Undo
Exit Sub
'Do nothing
End If

Many Thanks in advance
 
maybe an easier tact.

If you make your msgbox with a vbcritical or vbinformation etc as follows

MsgBox "Your Message Here", vbCritical, "Sound Test"

then access will play the windows default for these sounds.

Just a matter of selecting your prefered sound in the windows control panel

HTH

Dave
 
Rich, where's your creativity gone, have you lost your Va Va Voom??
 
I'd love to able to cite having to listen to the 1812 ' as an excuse for not doing any work, truth is of course "music" from a computer is nothing of the sort, and it becomes tedious after a while.
Call me old fashioned if you like, just don't call me OLD;)
 
Went for the easier option, the function option was a bit too advanced for me. Works great, thanks guys.
 

Users who are viewing this thread

Back
Top Bottom