Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Displaying an Array
Message
From
13/12/2000 13:32:11
 
 
To
13/12/2000 13:24:11
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00452983
Message ID:
00452992
Views:
25
>Is there a way to display the results of an array in a listbox if the query selects 0 records. I basically want to show a blank listbox if no records meet the criteria and show all records if any match. The problem is, if the 1st query returned 2 records and the 2nd query returned 0 records the 2 records from the 1st query remain in the listbox instead of blanking it out. Any help would be appreciated.

If the query results in 0 records, DIMENSION the array to have 1 row and however many columns it should have, and make the array empty - e.g.,
select * from rowsourcetable into array thisform.asource
if _tally = 0
  dimension this.asource(1,2)
  thisform.asource = ""
endif
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform