D
Damon E
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
because opening
the 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
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
because opening
the 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