[AccessD] Weird List Box

rockysmolin at bchacc.com rockysmolin at bchacc.com
Sun Mar 13 11:03:20 CDT 2011


WAG - try the scroll trick:  

In the open event of the form

dim x as Variant
x=Me.Listbox1.ListCount

May not make a difference but it's a 30 second test.

And how about requerying listbox 2 after the user makes a choice ?  Is
making Listbox1 a combo box with an after update event where you could
put the listbox 2 requery an option?


Rocky

-------- Original Message --------
Subject: [AccessD] Weird List Box
From: Tony Septav <iggy at nanaimo.ark.com>
Date: Sun, March 13, 2011 8:20 am
To: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>

Hey All
I have a test form with 2 list boxes, select an item in ListBox1 and it 
requerys ListBox2 and displays the results. 

No linked tables, not working with SQL Server, and no network
connection.

ListBox2 rowsource is a Query with where matrix=FndMyMatrix()
Requery in ListBox1 AfterUpdate.

Now most of the time if I arrow up and down in the ListBox1, ListBox2 
is requeryed and quickly displays the result. But sometimes when I open 
the form and
Arrow down to Item 2 in ListBox1, ListBox2 is slow to requery.
Arrow down to Item 3 in ListBox1, ListBox2 is slow to requery.
Arrow down to Item 4 in ListBox1, ListBox2 is slow to requery.
Arrow down to Item 5 in ListBox1, ListBox2 is slow to requery.
Arrow up Item 4 to Item 1 in ListBox1, ListBox2 quickly requeries.
Arrow down Item 1 to Item 5 in ListBox1, ListBox2 quickly requeries.
Arrow down to Item 6 in ListBox1, ListBox2 is slow to requery
Arrow down to Item 7 in ListBox1, ListBox2 is slow to requery
And so on.

ListBox1 displays 20 items at a time.
Sometimes I can quickly arrow down to the 20th item, but when I arrow 
down to Item 21, ListBox2 is slow to requery and so on.

This action is erractic, 99.9% of the time I have no problem opening 
the form and quickly arrowing up and down ListBox1, then out blue the 
above activity occurs. Because it is erratic it is making it kind of 
hard to trap for. Anyone have any ideas as to what could be causing 
this? Please don't tell me to tell my client not to use the arrow keys.

I have decompiled and copied the mdb.

Thanks

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list