By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,723 Members | 842 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,723 IT Pros & Developers. It's quick & easy.

close tapi dialer in XP after dialing number via access vba

P: n/a
I am using the following code (primarily wizard created) to dial a
phone number on an access form via the on double click event.

Application.Run "utility.wlib_AutoDial", stDialStr

I want to close the phone dialer application automatically after the
call is placed (maybe after 5 or 10 seconds), any suggestions? Right
now it stays open with a long list of pop ups for past calls

The TAPI dialer is required becasue the interface to the phone system
is via a tapi proxy running on the phone system and the phone shows up
as a tapi service provider, not a modem. I add this becaseu openiong
th com port and dialing directly is not an option.

Private Sub DaytimePhone_DblClick(Cancel As Integer)
On Error GoTo Err_DaytimePhone_DblClick

Dim stDialStr As String
Dim PrevCtl As Control
Const ERR_OBJNOTEXIST = 2467
Const ERR_OBJNOTSET = 91
Const ERR_CANTMOVE = 2483

Set PrevCtl = Screen.ActiveControl

If TypeOf PrevCtl Is TextBox Then
stDialStr = IIf(VarType(PrevCtl) > V_NULL, PrevCtl, "")
ElseIf TypeOf PrevCtl Is ListBox Then
stDialStr = IIf(VarType(PrevCtl) > V_NULL, PrevCtl, "")
ElseIf TypeOf PrevCtl Is ComboBox Then
stDialStr = IIf(VarType(PrevCtl) > V_NULL, PrevCtl, "")
Else
stDialStr = ""
End If

' remove invalid characters
stDialStr = "9" & FValidPhoneNumber(stDialStr)

'********** relevant code section

Application.Run "utility.wlib_AutoDial", stDialStr

'********** relevant code section

Exit_DaytimePhone_DblClick:
Exit Sub

Err_DaytimePhone_DblClick:
If (Err = ERR_OBJNOTEXIST) Or (Err = ERR_OBJNOTSET) Or (Err =
ERR_CANTMOVE) Then
Resume Next
End If
MsgBox Err.Description
Resume Exit_DaytimePhone_DblClick

End Sub
Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.