General information
Category:
Coding, syntax & commands
Environment versions
Network:
Windows 2003 Server
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only