Okay,
I'm a newbie here. I've done some searching on the forum and have not quite found the answer that I am looking for.
Here is what I want to accomplish.
1. I have 2 list boxes on my form.
2. When I Load the form, I want ListBox1 to display all PIM Contacts that have a mobile number and omit any that do not.
3. When I click/tap on an entry in ListBox1, ListBox2 will display a list of mobile numbers associated with the ListBox1 selection.
4. When I click/tap on the entry in ListBox2 that I want, I want to grab that phone number and assign it to a variable so that it can be written into a file or registry entry for later use.
Here is the code I am using so far:
LIST BOX 1
-------------------------------------------------
Sub cboButtons_SelectionChanged (Index, Value)
Dim MTL
Contact.New1
PimCol.New1("Contacts")
ListNumbers.Clear
ListContacts.Clear
For I = 0 To PimCol.Count -1
Contact.Value = PimCol.GetItem(I)
MTL = StrLength(Contact.MobileTelephoneNumber)
If MTL > 0 Then
ListContacts.Add(Contact.Nickname & "-" & Contact.LastName & "," & Contact.FirstName)
End If
Next
ListContacts.Refresh
End Sub
LIST BOX 2
------------------------------------------
Sub ListContacts_SelectionChanged (Index, Value)
Contact.New1
PimCol.New1("Contacts")
PimCol.GetItem(ListContacts.SelectedIndex)
ListNumbers.Clear
Contact.Value = PimCol.GetItem(ListContacts.SelectedIndex)
ListNumbers.Add (ListContacts.SelectedIndex & "/" & Contact.LastName & "/" & Contact.MobileTelephoneNumber)
ListNumbers.Refresh
End Sub
I could really use some help.
Thanks
Dave ///
I'm a newbie here. I've done some searching on the forum and have not quite found the answer that I am looking for.
Here is what I want to accomplish.
1. I have 2 list boxes on my form.
2. When I Load the form, I want ListBox1 to display all PIM Contacts that have a mobile number and omit any that do not.
3. When I click/tap on an entry in ListBox1, ListBox2 will display a list of mobile numbers associated with the ListBox1 selection.
4. When I click/tap on the entry in ListBox2 that I want, I want to grab that phone number and assign it to a variable so that it can be written into a file or registry entry for later use.
Here is the code I am using so far:
LIST BOX 1
-------------------------------------------------
Sub cboButtons_SelectionChanged (Index, Value)
Dim MTL
Contact.New1
PimCol.New1("Contacts")
ListNumbers.Clear
ListContacts.Clear
For I = 0 To PimCol.Count -1
Contact.Value = PimCol.GetItem(I)
MTL = StrLength(Contact.MobileTelephoneNumber)
If MTL > 0 Then
ListContacts.Add(Contact.Nickname & "-" & Contact.LastName & "," & Contact.FirstName)
End If
Next
ListContacts.Refresh
End Sub
LIST BOX 2
------------------------------------------
Sub ListContacts_SelectionChanged (Index, Value)
Contact.New1
PimCol.New1("Contacts")
PimCol.GetItem(ListContacts.SelectedIndex)
ListNumbers.Clear
Contact.Value = PimCol.GetItem(ListContacts.SelectedIndex)
ListNumbers.Add (ListContacts.SelectedIndex & "/" & Contact.LastName & "/" & Contact.MobileTelephoneNumber)
ListNumbers.Refresh
End Sub
I could really use some help.
Thanks
Dave ///