|
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' |
|
' |
|
' Product : DDE Global Code |
|
' |
|
' Name : dde_global.cbs |
|
' |
|
' Description : Routines to execute in Clarify for DDE test |
|
' |
|
' Author : First Choice Software, Inc. |
|
' 14412 Spicewood Springs Road |
|
' Austin, TX 78759 |
|
' (512) 418-2905 |
|
' |
|
' Platforms : This version supports Clarify 4.5 and later |
|
' |
|
' Copyright (C) 1999 First Choice Software, Inc. |
|
' All Rights Reserved |
|
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' |
|
|
|
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' |
|
' Functional Declarations |
|
' |
|
' Copyright (C) 1999 First Choice Software, Inc. |
|
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' |
|
|
|
OPTION EXPLICIT |
|
|
|
Global dde_key As Long |
|
|
|
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' |
|
' Show an Existing Case |
|
' |
|
' Copyright (C) 1999 First Choice Software, Inc. |
|
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' |
|
|
|
Sub show_case(case_id As String) |
|
Dim t_ret As New BulkRetrieve ' Structure to query the DB |
|
Dim case_list As List ' List of returned cases |
|
Dim case_rec As Record ' One returned case |
|
|
|
' Query for the case |
|
' Get the results |
|
t_ret.SimpleQuery 0, "case" |
|
t_ret.AppendFilter 0, "id_number", cbEqual, case_id |
|
t_ret.RetrieveRecords |
|
Set case_list = t_ret.GetRecordList(0) |
|
|
|
' If case not found, error message |
|
' Else, post the case |
|
If case_list.Count = 0 Then |
|
App.MsgBox "Customer keyed in case " + case_id + ", but that case is not found in the database." |
|
Else |
|
Set case_rec = case_list.ItemByIndex(0) |
|
App.ShowCase case_rec |
|
End If |
|
End Sub |
|
|
|
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' |
|
' Pop New Case Form. Filter on Supplied Data |
|
' |
|
' Copyright (C) 1999 First Choice Software, Inc. |
|
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' |
|
|
|
Sub pop_new_case(phone_num As String, to_phone As String) |
|
Dim dummy As New Form ' Form to use for messaging |
|
Dim my_nc As Long ' Key to use for specific form to notify |
|
|
|
' Start with no new case form |
|
' Post the new case form |
|
dde_key = -1 |
|
App.NewCase |
|
|
|
' Tell all 411's to identify one |
|
' Wait until that happens |
|
' Get the key of the form to speak with |
|
dummy.NotifyByID 411, cbFirstMessage + 30 |
|
While dde_key = -1 |
|
sleep(1) |
|
Wend |
|
my_nc = dde_key |
|
|
|
' Tell the form the phone number |
|
' And the product (if they called one of |
|
' the special numbers) |
|
dummy.NotifyByKey my_nc, cbFirstMessage + 31, phone_num |
|
Select Case to_phone |
|
Case "800-555-1212" |
|
to_phone = "MS Word" |
|
Case "800-321-1234" |
|
to_phone = "MS Excel" |
|
Case Else |
|
Goto next_one |
|
End Select |
|
' Tell the form the product code |
|
dummy.NotifyByKey my_nc, cbFirstMessage + 32, to_phone |
|
next_one: |
|
End Sub |