473,388 Members | 1,346 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

"On Key Down" property to search a list

6
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 2628
Rabbit
12,516 Expert Mod 8TB
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 Expert 2GB
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
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
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...
0
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...
2
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...
4
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...
2
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...
16
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)...
1
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
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...
3
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...

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.