Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OE Order Views Loops indefintely

Status
Not open for further replies.

vbdbcoder

Programmer
Nov 23, 2006
247
US

I am working on a tight deadline project of VB6.0 using OE entry ocx for version 2014. Everything is working except sometimes looping through OE details. Sometimes it keeps looping and loops back of the records. Below is the code that causes problem. vDView is the object for OE details. The .Fetch statement seems to fetch backward after the cursor gets to the last OE detail line. That causes endless looping.

Any input or thought where I might be wrong? Any input is highly appreciated.

vDView.Init
vDView.GoTop
vDView.Read

If vDView.Exists Then
Do Until vDView.Fetch = False
ItemQuery = vDView.Fields.FieldByName("ITEM").Value

If ItemQuery <> NSQUOTE Then 'skip NSQUOTE look up
'do my stuff here
End if
Loop
End If
 
You can actually replace everything you posted with:

Do While vDViewGoNext
ItemQuery = vDView.Fields.FieldByName("ITEM").Value

If ItemQuery <> NSQUOTE Then 'skip NSQUOTE look up
'do my stuff here
End if
Loop

Sage 300 ERP Certified Consultant
 
PS: The same people posting here are also posting on the Sage forums, too. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top