A while back Ettienne told me to use the format:
Do While view.GoNext
but when I use the following code it if I place a watch on the value of strTemp it changes when testing, assigning and looping indicating that the view is moving records and I'm not sure why:
Dim vCSOPTFD As AccpacCOMAPI.AccpacView
Dim strTemp As String
mDBLinkCmpRW.OpenView "CS0012", vCSOPTFD
vCSOPTFD.Browse "OPTFIELD = ""GLJOBSET""", True
vCSOPTFD.GoTop
Do While vCSOPTFD.GoNext
strTemp = Mid(vCSOPTFD.Fields("VALUE").Value, 1, 4)
Loop
End Sub
My data show there are 45 rows from sql server, but when looping it will only loop 15 times or even less and I can't understand why the cursor is moving on the test of the condition, the assignment to str temp and on loop.
Do While view.GoNext
CODE
Loopbut when I use the following code it if I place a watch on the value of strTemp it changes when testing, assigning and looping indicating that the view is moving records and I'm not sure why:
Dim vCSOPTFD As AccpacCOMAPI.AccpacView
Dim strTemp As String
mDBLinkCmpRW.OpenView "CS0012", vCSOPTFD
vCSOPTFD.Browse "OPTFIELD = ""GLJOBSET""", True
vCSOPTFD.GoTop
Do While vCSOPTFD.GoNext
strTemp = Mid(vCSOPTFD.Fields("VALUE").Value, 1, 4)
Loop
End Sub
My data show there are 45 rows from sql server, but when looping it will only loop 15 times or even less and I can't understand why the cursor is moving on the test of the condition, the assignment to str temp and on loop.