473,404 Members | 2,137 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,404 software developers and data experts.

how to display names in Combo Box as you type...

1
Need help in making a combo box in a form linked in a table with several columns. My main concern is given that I have 3 columns in the table namely First Name, Middle Name, Last Name, If I am in the form I want to call the information of a particular person, the step is I will type say C it will display all Last Names Starting in C together with the First Name and Middle Name. Example Carey, Jim Newman. And it will narrow down to a specific person as I type A particular name.


Attached Images
File Type: jpg Table.jpg (57.3 KB, 578 views)
File Type: jpg Form.jpg (58.6 KB, 537 views)
Oct 22 '11 #1
1 1914
Stewart Ross
2,545 Expert Mod 2GB
Combo boxes in Access already have this facility (autocomplete). To make this work with names you feed the combo box from a query which concatenates the name fields together. If I assume there is a key field which will remain hidden in your combo box (so you can write code to go to the record concerned after the combo is updated) the SQL for the combo would be along the lines of:

Expand|Select|Wrap|Line Numbers
  1. SELECT
  2.        [Your Key Field],
  3.        [Last Name] & ", " & [First Name] & " " & [Middle Name] as Name
  4. FROM
  5.        [Your Table]
  6.  
  7. ORDER BY
  8.        [Last Name] & ", " & [First Name] & " " & [Middle Name];
  9.  
-Stewart
Oct 22 '11 #2

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

Similar topics

3
by: Paul | last post by:
I have some option boxes and combo boxes that looks up values on a separate table (i.e. campus table with campusID & campus name fields) When I choose a selection from the combo box, it puts the...
1
by: Jinlin | last post by:
I am using PropertyGrid to display some attributes, one of them is a key/value pair struct. When you click on the attribute, a standard dialog box will popup that I can edit the values. My...
1
by: Bob | last post by:
When displaying data from the database, very often the field names are not suitable so custom headings have to be created, For example, the column storing zip code may be named zip, but when...
4
by: Miguel | last post by:
I have synchronized combo boxes linking Account Type with Customer Names based on the template that Microsoft has in one of its samples databases. There are the appropriate relationships between...
2
by: gopal | last post by:
Hi, i tried to display only the file names like "document1.doc", document2.doc and so on in the combo list But i am unable to do so in the file name combo box in SAveFileDialog. Any one know...
9
by: Salsafc | last post by:
Take three of your chosen programming languages( C , C ++ and Java) and compare and contrast them on the following perspectives:- • Type binding • Storage binding • Type Checking
4
by: dipperdan | last post by:
Hi, I am working on a plant database and I need some help with a query that i *thought* shouldn't have been too hard =\ I am trying to create a query that will display the names contained in 4...
7
by: babitha162 | last post by:
I have a combobox with a list of items in it. Now when the user enters a character I want the combox show the list of items that starts with the specified character. Could someone please help me...
3
by: chanlichin | last post by:
Hi, I am now want to retrieve only year from my table(summary),field name(dates). So i am facing the problem on how to display the year in combo Box. my sql statement as below. Thanks If i put...
3
by: abhijit mudugan | last post by:
i'm getting an error 'identifier display cannot have type qualifier' near the bold portion. what's wrong??? #include<iostream.h> #include<conio.h> #include<stdio.h> #include<stdlib.h> class...
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: 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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...
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...
0
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...

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.