Problem typing into combo box (1 Viewer)

gschimek

Registered User.
Local time
Yesterday, 21:18
Joined
Oct 2, 2006
Messages
102
This seems like it should be an easy setting change, but i can't find it...

I have two database with combo boxes used as search fields. I've used them for years, and they were originally created with Access 2000, in case it matters.

This week I just created a new database with Access 2010. I have a combo box with a table as the row source.

To keep it simple, let's say there are only two entries in the combo box.

I believe
I will

In my old databases, I could type "I wi" and it would jump to the "I will" entry.

But in my new database, if I type "I wi", I get "I wibelieve". After pressing the "I" it selects "I believe", but then everything else I type is inserted into the middle of the selection.

What am I missing?
 

burrina

Registered User.
Local time
Yesterday, 21:18
Joined
May 10, 2014
Messages
972
Hard to say without seeing your code.
Are you using Allen Browne's Find As You Type Feature?
 

gschimek

Registered User.
Local time
Yesterday, 21:18
Joined
Oct 2, 2006
Messages
102
There's not really any code, per say. It's literally just a combo box with a table as the row source. No VBA attached. When I start typing in the combo box, it matches with the first item, and then everything else I type is inserted between the first and second characters of the item that was matched.
 

burrina

Registered User.
Local time
Yesterday, 21:18
Joined
May 10, 2014
Messages
972
We have no way of knowing what you have! Still, here is an Example:
Of course, you would use the AfterUpdateEvent
Also, a query is best suited for this.
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[YourPrimaryKeyHere] = " & str(Nz(Me![cbosearch], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Me.cbosearch = Null

HTH
 

gschimek

Registered User.
Local time
Yesterday, 21:18
Joined
Oct 2, 2006
Messages
102
Thanks for the suggestion. I can tell you're doing your best to help me. This is a difficult one to explain without being able to see it happen, and I think I'm not explaining it well enough. I'm not trying to use the combo to search and display a matching record in the table. I'm just entering data into the combo box at this point.

I basically want the combo box to behave like a web browser address bar. Say I've gone to www.google.com and also www.bing.com previously. If I type "www." it will first match with the bing address because it's first alphabetically. But if I continue typing "www.g" it will then match the google address. The "oogle.com" would be highlighted, and the characters I've already typed are not. That's what I want this combo box to do, and it's how I'm used to seeing them behave on older databases I've written. For some reason, they're not acting that way on this database. The trailing characters are not highlighted, which I think is what's causing my typing to be inserted into the middle instead of selecting a new item from the rowsource as I continue to type.
 

gschimek

Registered User.
Local time
Yesterday, 21:18
Joined
Oct 2, 2006
Messages
102
Well, I figured it out. It seems to be because I was using the Windows 10 developer preview. I moved my database to a Windows 7 box and it worked as expected.

Thanks for the help.
 

Users who are viewing this thread

Top Bottom