List Box glitch - Deselects values (1 Viewer)

TJBernard

Registered User.
Local time
Today, 03:48
Joined
Mar 28, 2002
Messages
176
I have just come across what appears to be a glitch in MS Access, and I am not sure if there is a fix or not.

Maybe someone here has run into it.

I have a list box on a form with a large row set (over 2,187 rows). I have set the list box up with the "Multi Select" property of "Extended" which allows the users to use the [CTRL] and [SHIFT] keys, rather than clicking on every single value.

But, if the users select the entire list, and then deselect a value some where in the middle of the list box (by holding down [CTRL] and clicking on the value they don't want) and then take the focus off the list box, all the values below the value they de-selected automatically deselect. Even though before, they were in fact selected.

It is almost like a glitch, I can't think of any code to trap for it. I am just seeing if anyone else has run into it, and if so, if there is a fix.

Thank you,

T.J.
 

boblarson

Smeghead
Local time
Yesterday, 19:48
Joined
Jan 12, 2001
Messages
32,059
Make sure that the MULTI-SELECT property is set to EXTENDED and not SIMPLE.
 

boblarson

Smeghead
Local time
Yesterday, 19:48
Joined
Jan 12, 2001
Messages
32,059
And I just did a test on a list box with over 22,000 rows and it works fine for me.
 

TJBernard

Registered User.
Local time
Today, 03:48
Joined
Mar 28, 2002
Messages
176
Ah ha, I found out more information.

Yes, the List Box property does have the Multi Select set to "Extended".

But this is interesting. It is an MS Access 2003 database. When I open it in MS Access 2003, the list box works as I expect, I can deselect the one value in the middle I want to deselect.

But if I open the .mdb file in MS Access 2007, when I click on the value in the middle to Deselect, all the values below this value automatically deselect.

It is an Access 2003 .mdb database, but the glitch only occurs when I open it in MS Access 2007.

I then converted the file to MS Access 2007 (.accdb) and the error still occurs.

So this must only be a glitch with MS Access 2007 files.

Interesting.
 

TJBernard

Registered User.
Local time
Today, 03:48
Joined
Mar 28, 2002
Messages
176
I'll test tonight on mine too (when I get home where I have 2007 installed) and see if it does it for me.

Thank you for your help. We have just started moving towards MS Access 2007 here at work, so I have 2003 on my desktop and 2007 on my lap top.

I had a user complain about it, and I thought "hmmm, never heard of that before" and sure as can be, I tested it out and had the same problems.

I have a list box with over 2,000 rows. To recreate the error, I can open up either a .mdb or a .accdb file in MS Access 2007. On the list box, I selec the very first row, then scroll down the scroll bar to the very bottom, hold down the [SHIFT] key and click the last row, and all the rows are selected in the list box.

I then scroll back up half way or so, and hold down the [CTRL] key and click on a few rows to deselect them.

After this, in MS Access 2007, if you scroll back up the list a little ways, or click off the list box, all the rows below the rows you deselect, will automatically deselect.

Strange and interesting and my users, oh my, LOL.
 

TJBernard

Registered User.
Local time
Today, 03:48
Joined
Mar 28, 2002
Messages
176
I got some more time to play with this.

I was able to recreate the error in MS Access 2007, with a list box containing only 20 rows, rather than 2,000+.

So the size of the row source for the list box is not the concern. 20 is rather normal, I would think.

With the 20 values, I could see all the rows without using the scroll bar. So I selected all 20 by clicking on the first, then holding down the [SHIFT] key and click on the last row.

After this I held down the [CTRL] key and Deselected some values in the middle of the list box.

After this, I clicked off of the list box, and all the selected values below the values I Deselected automatically and incorrectly deselected.

So it must be a bug with MS Access 2007. I believe we have received all the Service Packs here at work.

Weird that no one else has run into this.
 

Users who are viewing this thread

Top Bottom