Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Recount()*2 - only lines with data
Message
From
04/08/2003 05:00:53
 
 
To
04/08/2003 04:19:11
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00816386
Message ID:
00816394
Views:
23
>I have two cursors in my form (income1 and expenses1).
>I want to check if the user entered data in ONE of them.
>
>I used with the following syntax:
>
select income1
>it=reccount()
>select expenses1
>ip=reccount()
>nr=ip+it
>*messagebox(alltrim(str(nr)))
>if nr<1
>messagebox('Please enter Income and/or Expenses!',0+16)
>return
>endif
>The problem is that VFP counting also empty records, how can I check if at list one cursor has one line with one value (without creating new cursors by select where not empty...)?
>Thanks in advance

Chaim, if you dont want to use SELECT statement you can use the COUNT FOR instead. Either way it requires a scan of the entire cursor so if the cursor is very large it will be time consuming.
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform