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!

Make Phone Call

Status
Not open for further replies.

TommyF

Technical User
Oct 28, 2001
104
Is there any way to make a phone call from with in Access. I have a database of customers and just wounderd if I had a headset attached to my pc could I press a button and have it dial the telephone number to make the call.

 
Here's an easy way to do it. Add a command button to your form. When the command button wizard appears, select Miscellaneous and then Auto Dialer. It will generate the code for you.
 
1. Your question is not unusual. Ones I saw an advertice from a database product (not access) where this was a standard feature.
2. I posted a time ago the same question in a news group. However up to now I failed to implement this. Here is a sample code I received.

If you succeeded to call a phone number from access it would please me to, let me know if possible.

Private Sub cmdCall_Click()
On Error GoTo Err_cmdCall_Click

Dim strDialStr As String
Dim ctlPrevCtl As Control
Const ERR_OBJNOTEXIST = 2467
Const ERR_OBJNOTSET = 91

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

Set ctlPrevCtl = Screen.PreviousControl

If TypeOf ctlPrevCtl Is TextBox Then
strDialStr = Me.Telefoonnummer
ElseIf TypeOf ctlPrevCtl Is ListBox Then
strDialStr = Me.Telefoonnummer
ElseIf TypeOf ctlPrevCtl Is ComboBox Then
strDialStr = Me.Telefoonnummer
End If

Application.Run "utility.wlib_AutoDial", strDialStr

Exit_cmdCall_Click:
Exit Sub

Err_cmdCall_Click:
If (Err = ERR_OBJNOTEXIST) Or (Err = ERR_OBJNOTSET) Then
Resume Next
End If
MsgBox Err.Description
Resume Exit_cmdCall_Click

End Sub

ring ring regards, pat.
 
Hello,

There is actually an object model for telephony (Microsoft Telephony), that you can reference from Access. I am using Access XP and I am not sure if this library is available to earlier versions.

I have not used it myself yet. It may be more than you require, but I thought I should point it out anyway. Will play around with it when I get a chance.

Dean :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top