I am trying to show a list of names from an addressbook group in a drop down 
menu. I want to be able to show those people that match those in the names() 
array.

The code snippet I have is as follows:

     dim g as ABGroupMBS
     if hGroup <> "" then
       g = Get_ABGroup(hGroup)  //separate function that returns the group 
based on the name "hGroup"
     end

     //create the seach elements for last, first and middlenames
     for i as integer = 0 to names.ubound
       
s1=g.searchElementForProperty(a.kABLastNameProperty,"","",names(i),a.kABContainsSubStringCaseInsensitive)
       
s2=g.searchElementForProperty(a.kABFirstNameProperty,"","",names(i),a.kABContainsSubStringCaseInsensitive)
       
s3=g.searchElementForProperty(a.kABMiddleNameProperty,"","",names(i),a.kABContainsSubStringCaseInsensitive)

       dim children() as ABSearchElementMBS = array(s1, s2, s3)

       //combine those element for this name
       sE(i) = a.searchElementForConjunction(cOR, children)

     next i

   //now combine all the search elements for all names

   s = a.searchElementForConjunction(cAND, sE)

  show_wDropDown(x,y, a.recordsMatchingSearchElement(s) )  //seperate method to 
show the resultant elements in a drop down

But this is producing a nil result for s.

The examples in MBS don't seem to cover this type of application.

Can anyone spot what I am doing wrong?

Jim
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to