473,805 Members | 2,017 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"On Key Down" property to search a list

6 New Member
I have a form that displays customer information in a list. I have a text box to search for a specific customer in the list. What I would like to do is that as the user types the customer name it goes to the customer as the user types in the name. An example of this is in the index view of the help file. If you type in the letter 'b' it goes to the 'b' topic, as you type and you then type the letter 'r' (so now you have 'br') it goes to the topic begining with 'br' such as break. Should I use the "On Key Down" property and if so how should I code it? Can any one tell me how to do this? Thanks in advance.
Nov 29 '07 #1
3 2760
Rabbit
12,516 Recognized Expert Moderator MVP
Using the On Change event would be better. And since the textbox is not updated yet, you have to use the .Text property to call the current value rather than what's stored. As for finding the value to go to, use DLookup to find the bound value of the list.
Nov 29 '07 #2
missinglinq
3,532 Recognized Expert Specialist
Is there a reason you don't want to use a combobox? Why not simply let Access do all the work?

Place a combo box on the form. When the Combobox Wizard comes up:

Select "Find a record on my form based on the value I've selected..."
Next
Select the appropriate identifying field to appear in the Combo box
Next
Size the Combo box column
Next
Name the combo box
Finish

Now the user can use the dropdown arrow of the combo box to retrieve the data or simply start typing the identifying data in and the combo box will start to autocomplete the entry. Access actually calls this AutoExpand (don't know why they don't call it AutoComplete!) but it behaves in the manner you desire! When the correct entry is found hit <Enter> and the appropriate data should be retrieved.

Welcome to TheScripts!

Linq ;0)>
Nov 29 '07 #3
pgill
6 New Member
Thank you all very much for your input. It looks like what I need. I'll give it a try. Thanks again for your time and input.
Nov 30 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
4108
by: Marcus Sheen [UK] | last post by:
Have done searches for similar questions, but cannot find anything. Nor can I find any resources via Google (Javascript Source etc). Thinking about implementing a topical "On This Day" feature on my site, where there would be a paragraph produced by Javascript to say: 1995: Something notable happened 2001: Something else of note happened I found something similar on http://www.freesticky.com, but it isn't really
0
1631
by: Kevin Schneider | last post by:
Please forgive me if this is a bit off topic, but I haven't had any takers in other forums. With ASP.NET projects, is it possible to have VS.NET automatically change the configuration options of the "Copy Project" dialog box based on the value selected in the "Solution Configurations" drop down list? I'd like to set up the project that when Release is selected and I select "Copy Project", my production server's values are filled in.
2
2900
by: George Marsaglia | last post by:
I have a set of, say, 2000 points in the 8-dimensional simplex S={(x_1,x_2,...,x_8),x_1+x_2+...+x_8=1, x's>=0}. To help analyze that 8-dimensional set, I wish to project the set of points onto each of the 'faces' {x_i+x_j+x_k=1} for the 56 choices i,j,k, that is, i=1 to 6; j=i+1 to 7; k=j+1 to 8. Finally, use gnuplot to load and plot each of the 56 files of 3-d points. I have C code that will, for given i,j,k, find the projection...
4
37468
by: charliewest | last post by:
I need to set the selected drop down list value at run time. I am aware of the method "SelectIndex" however this works only if you know the precise location of the value within the ListItem collection. Otherwise, what is the recommended approach? I have managed to set the appropriate value using the following loop: for (int i = 1; i < ddlUsers.Items.Count; i++) { if (ddlUsers.Items.ToString() == sUserId)
2
1533
by: Morten | last post by:
Hi. My problem is that nearly all items in my dropdownlist is quite long and I would like to display the text in a textbox with a mouseover. When I move the mouse down the list I see the bg color change. If anyone please could show me a vb sample I would be grateful. And if You please also could reply to mk @ intelle . no I would be most
16
2256
by: Mark Chambers | last post by:
Hi there, I'm seeking opinions on the use of regular expression searching. Is there general consensus on whether it's now a best practice to rely on this rather than rolling your own (string) pattern search functions. Where performance is an issue you can alway write your own specialized routine of course. However, for the occasional pattern search where performance isn't an issue, would most seasoned .NET developers rely on "Regex" and...
1
8460
missshaikh
by: missshaikh | last post by:
Hi All Friends. I need your help.. I want to format Bold Italic in Drop Down List Control in C#.i retrieve my data from db. like this . ________________ CD ROOM
2
3718
by: Doug | last post by:
Hi, I can't figure out how to create a drop-down list box. The help file says it exists. The icon in the help file matches the combobox in the toolbox. I tried using a combox box, both with and without using the wizard, and it will not "drop-down" - the list is horizantal. I don't see a variable to set to change that. I tried the listbox in the toolbox, and it is also horizantal (tried that first). The behavior I want is to list,...
3
20028
by: tdickerson | last post by:
Hi, I'm encountering a strange error after an upgrade has been run on a test site. Attempting to SELECT * FROM table or even just entering SELECT * (no table specified) returns the following error: SQL0103N The numeric literal "1234_upgrade" is not valid. SQLSTATE=42604 The only place that I could see that coming from is the name of the folder the database was backed up to before the upgrade. I did a search within files of the upgrade...
0
9716
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10607
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10359
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10104
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9182
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6875
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4317
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
2
3843
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.