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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What sounds do I have in Access?

Status
Not open for further replies.

InkyRich

Technical User
Aug 2, 2006
126
GB
Hello,
I need to create an alarm in an application. I don't really want to use the 'beep', what other sounds do I have that I can use?
Are there any ready-made code that I can use also?

Regards
Inky

A fool and his money are soon parted - so you might as well send it to me!
 
Look up the documentation for PlaySound and Google for "wav files".
 
Hi Golom,
Thanks to you I found a very interesting reply in the FAQ's section - number faq222-850, which helped me a lot.
Thanks
Inky

A fool and his money are soon parted - so you might as well send it to me!
 
You'd be surprised what you can do with just beeps. A colleague of mine developed some interesting variations on it, one of which sounded like one of the Nokia SMS alerts.

I'll post the code here on Monday (don't have it at home), if anyone's interested...

Ed Metcalfe.

Please do not feed the trolls.....
 
Yes please Ed.
Look forward to it.
Inky

A fool and his money are soon parted - so you might as well send it to me!
 
PHV posted this code in the past. I can't find the thread now. This code works with only WinXP or higher.
Code:
Private Sub Command0_Click()
Dim vo As Object
Set vo = CreateObject("SAPI.SpVoice")
vo.Speak "my boss is the best"
End Sub

________________________________________________________
Zameer Abdulla
Help to find Missing people
 
Have a look here:
thread702-1012783

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Examples of the use of the Beep and Sleep API calls, as promised:

Code:
Declare Function Beep Lib "kernel32.dll" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)

Public Function SMS()
    Dim X As Integer, Y As Integer
    
    For Y = 1 To 3
        X = Beep(2500, 150)
        Sleep 50
    Next Y
    
    Sleep 300
    
    For Y = 1 To 2
        X = Beep(2500, 400)
        Sleep 50
    Next Y
    
    Sleep 300
    
    For Y = 1 To 3
        X = Beep(2500, 150)
        Sleep 50
    Next Y
End Function

Public Function Ris()
    Dim X As Integer
    X = 37
    Do Until X >= 6500
        Beep X, 10
        X = X + 500
    Loop
End Function

Public Function bp()
    Beep 37, 1000
End Function

Ed Metcalfe.

Please do not feed the trolls.....
 
Thanks to you all for your suggestions.
They are all worth looking at.
Ed I will give your code a try.

Inky

A fool and his money are soon parted - so you might as well send it to me!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top