Loop question

lpaul

Active member
Joined
Dec 7, 2005
Messages
27
Programming Experience
Beginner
I am needing a lot of help with this loop. What I am trying to do is find a mactch between stext and ltext by searching ghe grpts1 "seatex" that matches the grpts1 recordset and if it does not match the first recordset then it needs to move to the next recordset to do a search. Can someone help me sort out this madness??

Do
'Searchtext = the field value of grpts1 value in "seatex"
SearchText = gRpts1.Fields("seatex").Value
'do until counter = number of lines to be searched
Do Until Counter = grpts1.Fields("lines2sea").Value
Linetext = objFF.ReadLine
'search until end of file
If objFF.Eof Then Exit Do
'and if ='s
lngOffset = objF.StrCmp(SText, Ltext) ' sees if there is a match between stext and ltext
'If lngOffset >= 0 Then
' Counter = Counter + 1
If lngOffset >= 0 Then
Counter = Counter + 1
End If
'loop until stext and ltext match
Loop
'Do Until lngOffset >= 0
' If (lngOffset < 0) Then
' grpts1.MoveNext()
' End If
 
Back
Top