472,330 Members | 1,279 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,330 software developers and data experts.

Erratic behavior in combo box typing completion search

A2K

I have a combo box that shows the content of a last name field from a
table. I use it to locate records in the table form.

I can open the form and locate several names quickly by placing the
cursor inside the drop-down list and typing the first few letters of
the name I want to find. Then, for no apparent reason, the list just
stops responding to subsequent searches for names that I KNOW are in
the list. The list contains no more than 300 names.

What am I overlooking?

Thanks.
Nov 13 '05 #1
4 3610
Have you turned the Allow Autocorrect property off?

--
Darryl Kerkeslager

Power corrupts.
Absolute power corrupts absolutely.
Knowledge is power.
See www.adcritic.com/interactive/view.php?id=5927
Nov 13 '05 #2
On Mon, 4 Apr 2005 07:47:59 -0400, "Darryl Kerkeslager"
<ke*********@comcast.net> wrote:
Have you turned the Allow Autocorrect property off?


Well, no I have not. Not sure I understand what that property does.
If I DO turn it off, what event should contain the following command?

Me.cboFindLName.AllowAutoCorrect = False

I have attempted placing this code in the form Open event and in the
OnEnter event of the control. Has no effect on the problem.

=======================
The code I'm using looks like this:

Private Sub cboFindLName_AfterUpdate()
On Error GoTo HandleErr

' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[UID] = " & Str(Me![cboFindLName])
Me.Bookmark = rs.Bookmark

....
Nov 13 '05 #3
"Lauren Wilson" <pr*****@nospam.com> wrote
"Darryl Kerkeslager" <ke*********@comcast.net> wrote:
Have you turned the Allow Autocorrect property off?
Well, no I have not. Not sure I understand what that property does.
If I DO turn it off, what event should contain the following command?


You can set the property to false in the property sheet of the combobox.
Allow Autocorrect allows Access to 'fix' words that it thinks you have
misspelled. Consequently, you may search for a last name of "Wheer", and
not find it because Access changes it to "Where". Sinister little things to
even notice; I religiously make sure it is turned off in every textbox and
combobox.

=======================
The code I'm using looks like this:

Private Sub cboFindLName_AfterUpdate()
On Error GoTo HandleErr

' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[UID] = " & Str(Me![cboFindLName])
Me.Bookmark = rs.Bookmark

...


If that does not fix the problem (apparently not), then I'm not sure what it
is. However, I would offer a suggestion that might help, regardless: It
looks like the bound column of your combo box is the last name field.
Assuming you have a numeric primary key field, use that instead, as the
combo box's bound value. As long as the last name is the first *displayed*
column, you still get the benefit of the Autoexpand, and you get a faster
and more reliable FindFirst:

rs.FindFirst "PrimaryKeyFieldName=" & Me!cboFindLName.Value

This *may* also fix your problem.
--
Darryl Kerkeslager

Power corrupts.
Absolute power corrupts absolutely.
Knowledge is power.
See www.adcritic.com/interactive/view.php?id=5927
Nov 13 '05 #4
On Tue, 5 Apr 2005 00:00:14 -0400, "Darryl Kerkeslager"
<ke*********@comcast.net> wrote:
"Lauren Wilson" <pr*****@nospam.com> wrote
"Darryl Kerkeslager" <ke*********@comcast.net> wrote:
Have you turned the Allow Autocorrect property off?


Well, no I have not. Not sure I understand what that property does.
If I DO turn it off, what event should contain the following command?


You can set the property to false in the property sheet of the combobox.
Allow Autocorrect allows Access to 'fix' words that it thinks you have
misspelled. Consequently, you may search for a last name of "Wheer", and
not find it because Access changes it to "Where". Sinister little things to
even notice; I religiously make sure it is turned off in every textbox and
combobox.

=======================
The code I'm using looks like this:

Private Sub cboFindLName_AfterUpdate()
On Error GoTo HandleErr

' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[UID] = " & Str(Me![cboFindLName])
Me.Bookmark = rs.Bookmark

...


If that does not fix the problem (apparently not), then I'm not sure what it
is. However, I would offer a suggestion that might help, regardless: It
looks like the bound column of your combo box is the last name field.
Assuming you have a numeric primary key field, use that instead, as the
combo box's bound value. As long as the last name is the first *displayed*
column, you still get the benefit of the Autoexpand, and you get a faster
and more reliable FindFirst:

rs.FindFirst "PrimaryKeyFieldName=" & Me!cboFindLName.Value

This *may* also fix your problem.


Your very kind input here gave me a clue to why the incremental search
feature only works sporadically: I failed to set the cbo object to
null after each search. All I needed to do was to insert the
following code after the last line above (Me.Bookmark = rs.Bookmark):

Me.cboFindLName = Null

That sets the unbound control to null so the next search is not
corrupted by the name found in the last search.

Thanks for your help! You're a prince.
Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: One's Too Many | last post by:
Ran into a strange problem today: 8.1.7 on AIX 4.3.3 Database and applications had been working fine for two years and all of a sudden a...
2
by: Mike | last post by:
I have a typical two frame frameset. Menu frame on the left, load content on the right frame. Lately I have been having problems in that...
0
by: Jonathan LaRosa | last post by:
This is wierd: A client of mine has a combo box on a form that has a list of school names. She has found a wierd error when she tries to search...
0
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0...
2
by: Rico | last post by:
Hello, I have Visual Studio 2003, working on a VB.net project. When I try to step through the code, the behavior is erratic, stepping in places...
3
by: emily.a.day | last post by:
I have a book database, and I have set up a query to search by subject. As it is now, the searcher has to know the subject and type it into the...
2
by: sara | last post by:
I can't find this in a post - I am not sure how to describe and search, so here goes: I have a combo box for the user to choose and existing...
4
by: Dave | last post by:
I wasn't sure how to search for previous posts about this, it felt real specific. Ok so here's the database & problem: I have 4 combo boxes:...
10
by: MNNovice | last post by:
Hello all: I could not get a combo box to display a list in a Search Form. My object is to select an artist's name and have his/her CDs listed on...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.