vbTextCompare questions

Results 1 to 2 of 2

Thread: vbTextCompare questions

  1. #1
    Join Date
    Dec 1969

    Default vbTextCompare questions

    I&#039;m trying to coduct a comparison where both the first and last name are present and as entered in a form.<BR><BR>I&#039;m definitely doing something wrong. <BR><BR><BR>Do Until objRS.EOF<BR><BR> If (StrComp(objRS("field1"), strField1, _<BR> vbTextCompare) = 0) AND<BR> If (StrComp(objRS("Field2"), strField2, _<BR> vbTextCompare) = 0) THEN<BR> bolFound = True<BR> ELSE<BR> objRS.MoveNext<BR> End If<BR> Loop<BR><BR>I get a syntax error at the AND.<BR><BR>Any suggestions?

  2. #2
    Join Date
    Dec 1969

    Default RE: vbTextCompare questions

    Do Until objRS.EOF<BR><BR>If (StrComp(objRS("field1"), strField1, _<BR>vbTextCompare) = 0) AND<BR> (StrComp(objRS("Field2"), strField2, _<BR>vbTextCompare) = 0) THEN<BR>bolFound = True<BR>ELSE<BR>objRS.MoveNext<BR>End If<BR>Loop<BR><BR>Only put the IF in once when doing a multiple check.<BR><BR>-Doug

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts