Link to home
Start Free TrialLog in
Avatar of KarenTaggart
KarenTaggart

asked on

combo box issue

My program has a combo box used to look up a horse by its name.  This has been working well for 6 years.  An odd symptom has been brought to my attention.  It's most repeatable when the horse's name begins with the letter "I".  Say I'm looking for a horse named Instant Equity.  When I type an "I" in the box, the first horse's name beginning with I appears ("I Dream Of Ivory").  Then when I type the next letter - an "n".  On SOME of my client's computers, the "n" will insert between the "I" and the space behind it - making it say "In Dream of Ivory" - instead of picking the first horse name beginning with "In".  My Win 7 computer shows this symptom (both with Access 2003 and 2007).  The client's server  (using Windows Server 2003) does NOT show that symptom (using Access 2003) but two of their Win 7 computers (Access 2003) do show that symptom.  Any ideas/suggestions? User generated image User generated image
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Interesting.  Can you upload the db to see if we can reproduce the issue?

What happens if you type "I" followed by a Space ?

mx
Avatar of KarenTaggart
KarenTaggart

ASKER

I tried that and if I type an "I' then a space, it inserts another space between the "I" and the original space.

The program is actually an adp, but I pulled a couple of necessary tables and the form into an mdb.  Still seeing the symptom (so it's not SQL data related).  I removed the subforms and commented out pretty much everything, so nothing actually works, but if you play with the Find Horse combo box, you can see if the symptom shows up on your computer.

Thanks! ComboTest.zip
ok ... so, relative to the db you uploaded (I have it), tell me an exact sequence to type where you see the issue ...  and exactly the issue.

Not quite sure what this means"

"will insert between the "I" and the space behind it "

Behind what ..?

Also, I will try on my Win 7 machine at home w/ A2010.  This is XP with A2003.

mx
Sorry - missed a word.  When I type "I" and then a space, the combo box inserts another space after the "I" and before the original space.

So if you type "I","I Already Left" appears.  If you type any other character, the combo box inserts  the newly typed character (letter, space, whatever) between the "I" and the original space.
ok .. just so I'm clear, what do you 'think' it should ... for this example?

mx
"If you type any other character, the combo box inserts  the newly typed character (letter, space, whatever) between the "I" and the original space"

To me, that is the expected behavior, because you have only typed one character. So, I would expect to see the next character in that position.  Am I missing something ?

mx

I never expect the type-ahead feature to insert characters - I expect it to accept the characters I type and display the first name that matches the characters I type.  Let's say you're looking for "Deadly Dasher."  You type a D and get the first horse whose name starts with D - which is "D C Slammer"..  Then you type an E and you get the first horse that starts with DE - it does not insert the E between the original D and the space after the D.. it displays "De Baba". Then type an A and it displays "Deablo~s Gal" - again, not inserting the A, just finding the first name that starts with first 3 letters.
I get this in sequence if I type  dea

D C Slammer
De Baba
Deablo~s Gal

which is exactly what I would expect to get. So, are you not getting that ... in some cases?  
Or you are getting that, and you don't think that is correct ?

mx
ok ... there does seem to be an issue if I type

deadly
I get look ahead up to the to the 'l' in deadliest ... then look ahead stops.
I do *not* get a look ahead *after* I type the 'y', ie the look ahead stops at that point.
However, if ... I then type a Space ... Dasher then shows.  That ... is not ... what I would expect.  Is this what you are seeing/saying ?

Note however that if the list is in the drop down state, then you do see the look ahead working - hit F4 before you start typing.  Does seem to be an issue resolving the Space.

fyi ... head off to LA Fitness ... back in ~ 1.5 hrs

mx
Capture1.gif
Capture2.gif
Capture3.gif
Capture4.gif
Even if I hit F4 (or click the drop-down arrow in the combo box), when I type "I" then a space, it adds a space instead of doing type-ahead.  This client has 139 horses whose name begins with "I" and a space so I'm trying to keep them from having to scroll down that many.

An odd part of it is that if I type "A" and a space, I don't get the same symptom.  It does actually do type-ahead.  The client is saying it's not limited to horse names beginning with "I" but I can't find any others that produce the symptom.
Oh, and yes -  the typing "Deadly" example is what I expect.  Since there is a horse named just "Deadly", I expect it to show only that.  Then adding the space "types ahead" to show the first horse name that starts with "deadly ".  The only time I'm seeing the symptom is when the horse name starts with an "I" - and then, no matter what character is typed next, that character is inserted in the name that was displayed when the "I" was typed.

Try to find a horse's name that begins with an "I" using the type ahead (not the mouse, not the down arrow).  It it selecting names farther down the list or is it inserting an extra character after the initial "I"?
"Since there is a horse named just "Deadly"
I completely missed that!

" It it selecting names farther down the list or is it inserting an extra character after the initial "I"?

When I type a single "i" (eye, right?) ... I get what you see in the image below.

So, I would say it's not ... selecting names further down.


Capture1.gif
side note. If you add this code:

Private Sub Form_Load()
   
Dim x
x = Me.cboFindHorse.ListCount  ' force the combo to be fully populated

End Sub

... it will eliminate the messed scrolling of the combo when the list is dropped down, while Access continues to attempt to fully populate the list, which in your case is quite ... Large.
ok ... just tried this on my Win 7 x64 A2010 system ... same results.  

"Flaming Jet Chick" ... dig that name !!!

btw, are you on the west coast ?

mx
Nope not west coast - Oklahoma! :o)

To see if it had to do with the massive amounts of data in the rowsource, I tried a combo box with a shorter list of names (about 700 - not unreasonable) but still had the same symptom if the horse name starts with "I"  (Yes - "eye")  Then tried it with a list of 196 - all of them ONLY horses starting with "I" - same danged symptom!  What could it be with that letter?  What puzzles me is that it does not happen when starting with a different letter that could be a whole word (like "A" or "O" - which had horses named things like "O Danny Boy")>
So, just checking ... based on what I've said/shown, I have not reproduced this, right?

mx
Well, I think you have.  When you type "I", then type another letter, are you seeing the newly typed letter inserted right after the "I" - but only changing the name already selected, not selecting the first name with those two letters?  Or - another way to ask - are you seeing different combo box behavior when you first type an "I" then type more letters vs typing any other first letter and typing more?  (So - are you seeing different results when you type "in" vs typing "an"?

Also - when you first type any other letter than "i", the rest of the horse's name is selected (see first image), but when you type an "i", they are not (see second image).
 User generated image User generated image
I just took another loook at your screen shot showing "I Already Left" - and the rest of the horse's name (after you type "i") IS selected.  So I think the symptom is NOT showing up on your computer after all.  What operating system are you using?  (Op system is the only thing I can determine different between the client's computer that shows the symptom and the ones that don't.)
OS
Win XP SP3, A2003 on one system
Win 7 x64 (does NOT have SP1), A2010 on another system (Office SP1)

I have one other system I can try on in a bit.

mx
Well well ... on the 3rd system ... XP SP3, A2003 - which should in theory be the same as my other laptop - I get the issue (see image), and it seems only with the letter "i" (upper or lower case).  I type an "I" ... and that results in what you see in the image, different in the previous image I posted.

What I see happen is ... there is a momentary brief flash of correct highlighting/select of the remain text, then it goes away. I've seen this before.  I suspect - it is some minor difference in display drivers.  And there was one instance with it did select properly.  Go figure.

I will mess with it later more ...

mx
RoboScreenCapture.jpg
Thanks.  At least the symptom is appearing for you on that computer!  I have noticed the flash, but don't know what to make of it.
ASKER CERTIFIED SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
YOU ROCK!!!  Thank you so much!!
That turning off "Auto Correct" for the combo box worked like a charm! I've worked with Access for over 15 years and never even realized that was there!
:-)
I tried every possible setting, different fonts, you name it.  Suddenly it HIT me!

The individual control version of Auto Correct is usually ... not a problem. But from now on, I'm turning it off for ALL controls!

mx