Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sounds in Access

Status
Not open for further replies.

wjc1022

Technical User
Joined
Oct 28, 2003
Messages
1
Location
US
how can i get a wave or mp3 to play when the field gets focus on a form
 
add this to a module:
Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

Public Sub PlaySound(strSound)
Call sndPlaySound32(strSound, 0)
End Sub

add this to the gotfocus event:
Call PlaySound("C:\Windows\Media\chimes.wav")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top