Dial

soleed

Registered User.
Local time
Today, 08:29
Joined
Aug 17, 2005
Messages
11
Hi ,
i have a field in my users tabel call phone and i want to place a button that use this field value and dial it thru a modem cam i do this ????
 
One way to do this would be the Auto Dialer, make a new command button and choose miscelaneous from the Command Button Wizard and then select Auto Dialer. Once you get the Dialer you can attempt to modify the code to your liking. Make Sure the Previous Control is the Textbox with the phonenumber you wish to dial, this will ensure the auto dialler gets that number as a defualt and all you would have to then do is modify code to dial straight away unless you wanted to click on ok.
hth
Chris
 
THIS IS THE CODE
On Error GoTo Err_Command0_Click

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

Set PrevCtl = Screen.PreviousControl

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

Application.Run "utility.wlib_AutoDial", stDialStr

Exit_Command0_Click:
Exit Sub

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

End Sub


how i can get the field data and auto dial without ok
 

Users who are viewing this thread

Back
Top Bottom