F
Fermon
Hi,
I am not sure this is the right group to post this question, but I think you
will be able to point me in the right direction in any case.
I have a pop-up form that apears to help users select records with different
simple criteria. The criteria is very similar to what you would find in a
custom filter in Excel (equals, does not equal, begins with, contains, etc).
The matching records are added to a Listbox. BTW, I have Office 2k3 Pro
running on WinXP Pro SP2.
The problem I have is that in some cases, that I find hard to replicate, the
performace of the Listbox adding or deleting records suffers tremendously. It
takes the Listbox about 1 second to delete or add items sometimes. The list
can contain up to 800 items, so it can mean a long wait for a user to add
items.
I don't think the problem is my code because the form works well and fast
when it's first open, no matter how many additions/deletions are made. If I
close the form after it gets sluggish and reopen it, adding or deleting is
again a breeze. The problem seems to appear when the selected item in the
listbox is deleted, but again, I can't seem to replicate the problem. It just
looks like a memory leak somewhere. I have also noted that if I never click
on the Listbox, I can add and delete and add and delete items withouth
performance degradation.
My question is: Is there a known performance issue with the Listbox control
or something I should avoid to keep my performance intact? Should I make sure
the control does not have the focus when adding/deleting stuff, or making
sure that the selected item is never deleted? I don't allow multiple
selections at the moment.
Thanks in advance,
Fermon
I am not sure this is the right group to post this question, but I think you
will be able to point me in the right direction in any case.
I have a pop-up form that apears to help users select records with different
simple criteria. The criteria is very similar to what you would find in a
custom filter in Excel (equals, does not equal, begins with, contains, etc).
The matching records are added to a Listbox. BTW, I have Office 2k3 Pro
running on WinXP Pro SP2.
The problem I have is that in some cases, that I find hard to replicate, the
performace of the Listbox adding or deleting records suffers tremendously. It
takes the Listbox about 1 second to delete or add items sometimes. The list
can contain up to 800 items, so it can mean a long wait for a user to add
items.
I don't think the problem is my code because the form works well and fast
when it's first open, no matter how many additions/deletions are made. If I
close the form after it gets sluggish and reopen it, adding or deleting is
again a breeze. The problem seems to appear when the selected item in the
listbox is deleted, but again, I can't seem to replicate the problem. It just
looks like a memory leak somewhere. I have also noted that if I never click
on the Listbox, I can add and delete and add and delete items withouth
performance degradation.
My question is: Is there a known performance issue with the Listbox control
or something I should avoid to keep my performance intact? Should I make sure
the control does not have the focus when adding/deleting stuff, or making
sure that the selected item is never deleted? I don't allow multiple
selections at the moment.
Thanks in advance,
Fermon