473,561 Members | 3,057 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3684
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*********@co mcast.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 .AllowAutoCorre ct = 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_Af terUpdate()
On Error GoTo HandleErr

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

....
Nov 13 '05 #3
"Lauren Wilson" <pr*****@nospam .com> wrote
"Darryl Kerkeslager" <ke*********@co mcast.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_Af terUpdate()
On Error GoTo HandleErr

' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Cl one
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 "PrimaryKeyFiel dName=" & 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*********@co mcast.net> wrote:
"Lauren Wilson" <pr*****@nospam .com> wrote
"Darryl Kerkeslager" <ke*********@co mcast.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_Af terUpdate()
On Error GoTo HandleErr

' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Cl one
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 "PrimaryKeyFiel dName=" & 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
3199
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 couple of regularly-run queries are now no longer coming out in correct sort order specified in the ORDER clauses of the select statements. Behavior is erratic, about half the time the sort order is...
2
1986
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 sometimes menu links will open a new window instead of loading on adjacent frame. When I reload the frameset then pages load as they should. What could cause this erratic behavior?
0
1205
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 for a specific school. She is trying to type in "Communal School of Boston" in the combo box. After she typed "Comm", the contents of the box showed "Comm. on School Reform", and the cursor was...
0
3210
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 pages, and the DLLs are managed DLLs converted/developed with VB.NET. What I want from debugging is to be able to step into the methods in the DLLs called from ASP scripts using Visual Studio .NET. ...
2
1372
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 where no code exists, jumping over code sections without any goto lines or anything, and also, when I try to use WriteLine, Console.Writeline or Debug.Writeline nothing happens, nothing comes out...
3
3295
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 query. I wonder if there is a way to have a combo box where the searcher can select the subject before running the query, rather than consulting the separate subject list and typing the subject in...
2
1976
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 vendor (there are about 1200 vendors). The user can start typing the name "David Or" and it will take him to the records that match the data he's entered. Typing "David Or" will show "David Ortiz"...
4
2355
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: cboServer, cboPolicy, cboDB, and cboApplication. The idea behind the database is for a user to search/ select desired information in any kind of combination between the 4 combo boxes. Then the user...
10
2548
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 the subform through a qry. But I couldn't do it. When I tried to type an artist's name, I get an error message telling me the name does not exist in the list. I was successful in getting data by...
0
7637
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8072
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7605
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7924
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5177
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3591
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2055
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1171
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.