Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' create a new web service Dim service As pt.bn.sirius.SearchService service = New pt.bn.sirius.SearchService() ' create an array for the terms Dim terms(1) As String If cmbTerms01.Text = "Title" Then terms(0) = "TI" ElseIf cmbTerms01.Text = "Author" Then terms(0) = "AU" ElseIf cmbTerms01.Text = "Subject" Then terms(0) = "AS" Else terms(0) = cmbTerms01.Text End If If cmbTerms01.Text = "Title" Then terms(1) = "TI" ElseIf cmbTerms01.Text = "Author" Then terms(1) = "AU" ElseIf cmbTerms01.Text = "Subject" Then terms(1) = "AS" Else terms(1) = cmbTerms01.Text End If ' create an array for the values Dim values(1) As String values(0) = txtValue01.Text values(1) = txtValue02.Text ' create an array for the precedences Dim precedences(1) As Integer precedences(0) = 1 precedences(1) = 1 ' create an array for the operators Dim operators(1) As String operators(0) = cmbOps.Text operators(1) = "AND" ' create an array to get the results of the service Dim records() As pt.bn.sirius.MarcXML ' invoke the service records = service.search(terms, values, precedences, operators, 10, 1) Dim Idx, I As Integer Dim fStr As String ' display the results fStr = "FOUND " & records.Length & " RECORD(S)" & vbCrLf & vbCrLf For Idx = 0 To records.Length - 1 Dim record As pt.bn.sirius.MarcXML record = records(Idx) For I = 0 To record.fields.Length - 1 fStr = fStr & record.fields(I).tag & ": " & record.fields(I).content & vbCrLf Next fStr = fStr & vbCrLf & "**********************************************" & vbCrLf Next txtResult.Text = fStr End Sub