Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox reporting improper Listcount.
Message
From
26/10/2005 13:05:23
 
 
To
26/10/2005 12:06:14
Diran Nazarian
Alion Science and Technology
Annapolis, Maryland, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01062256
Message ID:
01062286
Views:
21
>Hello all,
>
>I have encountered a weird problem with my listbox. (I can not use a grid, because this is an upgrade of existing software that doesn't budget changing the control used.) Now here's the setup of my listbox:
> The RowsourceType = 6 - Fields
> The controlsource is a variable that evaluates a SQL expression that reads from a table.
>
>The problem occurs when I programmatically add or remove an item from the listbox (over 1000 items), the LISTCOUNT property displays the value of all the records in the table. Say I add 1000 items to the list programmatically it displays a LISTCOUNT of 1000 items, but when I add 1 more item it display a LISTCOUNT of the total number of records in the table.
>
>Has anyone encountered this problem before? If so, any ideas on how to remedy the situation?
>

It sounds to me like you're trying to mix and match two different RowSourceTypes. With RowSourceType=6, you shouldn't be adding items to the list directly, only to the table. If you want to be able to add items directly, you need to use RowSourceType=0.

Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform