Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Correct Syntax For 'AND' & 'OR' with Locate Command
Message
From
25/03/2018 16:26:58
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Correct Syntax For 'AND' & 'OR' with Locate Command
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01658981
Message ID:
01658981
Views:
59
I am using the following command to Locate something in a Table
For I=2 to m.lnpagecount
LOCATE FOR  LEFT(STREXTRACT(POS,'(',')'),10)= '- One Time' OR ;
LEFT(STREXTRACT(POS,'(',')'),23)='- Account Level Charges' OR ; 
LEFT(STREXTRACT(POS,'(',')'),23)='Itemized Calls' AND Pageno=(I+1)

IF Found()
**Do Something based on certain conditions
Endif

I=I+1
Endfor
Since the value of I is 2 initially my cursor should Locate for page 3 initially and each time it should locate the data in Pageno 4 , 5 , 6 etc as the value of I increases by 1 each time.

But Every Time cursor is halting on Pageno=2 even though the value if I is increasing to 3,4,5 etc. What is the problem ?


What will be the proper syntax to use this.

Thanks
Harsh
Next
Reply
Map
View

Click here to load this message in the networking platform