Try this app. Attached .sbp file below.
All contact numbers on 'my' device seem to be stored in
con.
BusinessTelephoneNumber field
This app searches for a string match on the name(s) returned
from the ContactDialog. Stored in global 'dianame', if found.
a=con.FirstName & " " & con.LastName
If a = dianame Then
if no match is found it looks for
a=con.FirstName
If a = dianame AND con.LastName="" Then
Windows Mobile seems to treat 'Mum Home' different to 'Mum'.
'Mum' is saved as con.FirstName
'Home' gets saved as con.LastName
I havent considered 'Mum Mobile Work' :sign0148:
Just search con.?TelephoneNumber for other numbers once
you have a string match on the name's.
Sub Globals
dianame=""
End Sub
Sub App_Start
form1.Show
phone.New2
diag.New1
hw.New1
con.New1
pim.New1("Contacts")
End Sub
Sub findu
WaitCursor(True)
For b=1 To pim.Count -1
con.value=pim.GetItem(b)
a=con.FirstName & " " & con.LastName
If a = dianame Then
Msgbox(con.[COLOR="Red"]BusinessTelephoneNumber[/COLOR],a)
WaitCursor(False)
Return
End If
Next
For b=1 To pim.Count -1
con.value=pim.GetItem(b)
a=con.FirstName
If a = dianame AND con.LastName="" Then
Msgbox(con.[COLOR="red"]BusinessTelephoneNumber[/COLOR],a)
WaitCursor(False)
Return
End If
Next
WaitCursor(False)
End Sub
Sub Button1_Click
diag.ShowDialog
dianame=diag.SelectedContactName
findu
End Sub