|
-
Feb 27th, 2001, 04:00 PM
#1
Thread Starter
Lively Member
Ok, I might be askin alot here. But I'm horrible at seeing my own mistakes...
This loop never ends...
Thanks alot if you can help.
Do Until Text2.DataField = "FIELD128"
strName1 = Mid(Text2.Text, 2)
If InStr(1, LCase(strList), LCase(Mid(strName1, 2)),vbTextCompare) > 0 And strName1 <> "" Then
strPort = Mid(strPort, 2)
terrCount = terrCount + 1
Call cmdPrintTerr_Click
End If
Text2.DataField = strField(dfInt + 1)
Loop
And the strField array is set up so that each substring is "FIELD" and the number.
i.e. strField(1) = "FIELD1" and strField(120) = "FIELD120"
Thanks again.
-
Feb 28th, 2001, 12:30 AM
#2
New Member
apply VB troubleshooting tools
No errors raised? Here's what I can see as possibilities.
Put parenthesis around IF conditions in loop - could be ambiguously evaluated.
Could any variable (such as strName) by null? Will cause error or inconsistent results in InStr function, etc.
What about Call cmd... - could this be the problem?
Possible hidden control code in array contents?
Is there an artificial limit (0-127) which never reaches 128?
Hints: insert MsgBox to show variables inside your loop as it executes, see where it goes south. Insert breakpoints to pause and examine contents. Step through code to see where it dies.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|