General information
Category:
Coding, syntax & commands
Environment versions
Network:
Windows 2003 Server
>The control source of the listbox is an Evalution of an expression. (ex. EVALUATE(lc_expression)) I then have the property rowsourcetype = to 6 (fields) and the rowsource is equal to the expression, which is comprised of fields from the table that contains data.
>
>So an example of my form's load is the following
>
>lc_expression = 'table.field1 + ":" + table.field2'
>
>lc_listdata = EVALUATE(lc_expression)
>
>
>Listbox properties:
>
>ControlSource = lc_listdata
>
>Rowsourcetype = 6 ('Fields')
>
>Rowsource = lc_expression
I'm still having a hard time seeing what the ControlSource is at runtime. However, it looks like both RowSource and ControlSource point to the same table. If that's the case, you're definitely going to run into problems.
>
>Another thing to keep in mind is I have a fiter set to the table. This is done so that I retrieve only the data I want from the table into the list. I believe it's the filter that is causing all this headache.
>
A much cleaner solution is to set RowSourceType to 2-Alias and then use a query to populate a cursor with the rows and fields you want to show. It avoids the filter issue, and keeps the list you're looking at to the minimum number of records, which should improve performance. In this situation, I like to put the query into the Requery method if the list will change in the list of the listbox.
>Having all of these the list just doesn't seem to behave properly and I can't figure out why it would have any effect on its listcount.
I don't know either, so the easiest thing is to just clean it up and see if the problem goes away.
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