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

AutoComplete

How a Bounded TextBox could give AutoComplete choices from a field in a table to the user?

I searched about this in the internet but i could not found any things!

Thanks in Advanced
Apr 12 '10 #1

✓ answered by TheSmileyCoder

I would use a combobox, with the rowsource set to:
"SELECT distinct tx_LastName FROM tbl_Users ORDER BY tx_LastName"

This will let you use all the previous entries as a source of autocompletion. (or autoexpand as missingling wrote.

7 3426
TheSmileyCoder
2,322 Expert Mod 2GB
Hi
Since I don't know how experienced you are, im gonna start of by asking:
Are you sure a combobox doesn't suit your needs? They come with autocomplete.

Try explaining what you need it for, that will allow us to give you the best possible help.
Apr 12 '10 #2
@TheSmileyOne
If a field's value/values be predictable or constant the best way ,as you said,is ComboBoxes But assume that a field such as "LastName" with various values,I do not know all last names in the world to enter in a Comboboxe's source data to use!
in other way ,with TextBoxes, it is not interesting Database user types all last names even that are similar and repetitive!

Thanks So
&
Excuse me for puny English knowledge
Apr 12 '10 #3
missinglinq
3,532 Expert 2GB
...I do not know all last names in the world to enter in a Comboboxe's source data to use!
I'm sorry but your post simply makes no sense! There is no way for any autocomplete hack to work, whether a combobox or a textbox, without a source! Where do you think Access is going to come up with the data to attempt to guess whether you mean Adams or Adar when you type in Ad if it doesn't have a sorce for last names?

The best approach for this, as Smiley said, would be a combobox with its inherent autocomplete (actually called Autoexpand) feature. You can then use the NotInList event of the combobox to write a routine to add new names as you come to them.

Linq ;0)>
Apr 12 '10 #4
TheSmileyCoder
2,322 Expert Mod 2GB
I would use a combobox, with the rowsource set to:
"SELECT distinct tx_LastName FROM tbl_Users ORDER BY tx_LastName"

This will let you use all the previous entries as a source of autocompletion. (or autoexpand as missingling wrote.
Apr 12 '10 #5
@missinglinq
You are right!
Assume now db is empty and a user wants to store "Adams" family then he/she must type "Adams" Completely and it is no problem for my user to type a word completely in the first time but i want in the second time or after that when the user types "A" Access shows him/her "Adams"or the other word entered previously in the table and starts with "A" and when user types "d" shows to the user the first word in the table starts with "Ad" ,maybe "Adams",.....with progress in data entry and become database bigger doing type become easier and easier than the past.
if i am in wrong please tell me.
Best wishes for you
A.M
Apr 12 '10 #6
@TheSmileyOne
It worked great!Thanks.but i liked to this by a text box.
No problem.
Bye
Apr 12 '10 #7
NeoPa
32,556 Expert Mod 16PB
The facility is not available in a TextBox I'm afraid.

Linq's post explains how to get as close an approximation as possible using ComboBoxes, but the feature you are describing (like that available in Excel) is not available in Access.
Apr 12 '10 #8

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

Similar topics

4
by: bc | last post by:
Hi, Is it possible to detect if the IE autocomplete function in a current context such as a textbox is activated (ie. dropdown with previously entered info is visible)? Problem: I use a script...
40
by: Alex | last post by:
Hello, does anybody know how to turn off the autocomplete feature for a certain text field? I am aware of the "autocomplete" attribute, but I have seen other implementions achieving it...
0
by: Thorsten Ottosen | last post by:
Hi, I'm using the AutoComplete attribute to control transactions. What happens if I call functions with the AutoComplete attribute from within other functions with the AutoComplete attribute?...
8
by: moondaddy | last post by:
I have a form for entering a user's address and all fields have a required validating control associated with them and the error msg for each field displays right next to it. The normal behavior...
2
by: Mrinal Kamboj | last post by:
Hi , Need to get some basic info regarding AutoComplete Attribute in COM+ . I am having a class with TransactionOption set to Required , now for this class , can i mark all the methods with...
1
by: thubba2000 | last post by:
We have a web application developed using IBuySpy. In older versions, Autocomplete on all web forms works. In our latest version, it stopped working on all clients. I have gone through all the...
1
by: rbg.net | last post by:
I know that there is a autocomplete property for the HTML "INPUT type=text" control which if set to OFF, disables autocomplete of the input textbox (doesn't remember previously entered values) ...
8
by: nil | last post by:
Hello all, It's urgent... i want to add autocomplete textbox facility in my application like google. as you type it suggests option to the user..i want the same kind of facility...i know i...
1
by: wkerplunk | last post by:
Below is what I have build with several different languages. It works great but I need help, I am stuck. When you click on an item in the dropdown autocomplete div it does a mousedown function...
5
by: Doug | last post by:
Hi I have a simple form, just with one combo box and an OK button - and i have tried to use the autocomplete routine and I have enabled autocomplete in the combo box properties. ...
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
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?
0
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,...
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.