473,387 Members | 1,619 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,387 software developers and data experts.

Auto-Fill data entry form

I have a form "Add" that I use to enter data into my database. All the controls on this form are textbox controls (for data entry). How would I make these textboxes auto-fill as the user types into that text box?

For example:

From an empty database.

I enter "Steven" as a first name into a field bound to my textbox control.

On the next record, as I type "St" as a first name into my textbox. The textbox should populate with "Steven". Until I finish entering "Stu".

Basically, I want it to try to populate to the most common entry in each field that the textboxes are bound to based on previous records.

Any help or insight would be most appriciated.

Thank!
Dec 13 '11 #1

✓ answered by patjones

Yes, absolutely. There are a few things you need to be aware of in order to make it work. Namely, in the combo box's property sheet:
  1. Column Count should be set to 1.
  2. The Control Source needs to be set to the column that you are doing data entry for.
  3. The Row Source needs to be set to the table in question.
  4. Limit to List needs to be set to 'No'.
  5. Auto Expand is set to 'Yes'.
When you do this, be aware of what the required columns are. For example, if employee ID, first name, and last name are all required per the table's design, then at minimum you need to supply controls for entering these.

6 4121
patjones
931 Expert 512MB
This kind of functionality could be difficult to implement in Access with a text box, as are many other things that we see on webpages.

My question is what you'd want to see happen if there is more than one match for "St". For instance, what if Steven and Stacy are already in the table? Which one shows up? In the context of a webpage, this issue would be solved by using a drop-down that appears with the possible matches. Taking a cue from that technique, it may be possible to accomplish what you are looking for by using a combo box. If the combo box is bound to the column in question, you can set it to auto fill. I recommend taking a look at that option.

Pat
Dec 13 '11 #2
Pat,

Thank you for reading my post.

My thought is that if there are multiple entries that may satisfy the auto-fill, the most commonly used entry will pull up first.

I understand the auto-fill with a dropdown list. However, would using a combo box still allow for new entries or would it be limited to a specific list?
Dec 13 '11 #3
patjones
931 Expert 512MB
Yes, absolutely. There are a few things you need to be aware of in order to make it work. Namely, in the combo box's property sheet:
  1. Column Count should be set to 1.
  2. The Control Source needs to be set to the column that you are doing data entry for.
  3. The Row Source needs to be set to the table in question.
  4. Limit to List needs to be set to 'No'.
  5. Auto Expand is set to 'Yes'.
When you do this, be aware of what the required columns are. For example, if employee ID, first name, and last name are all required per the table's design, then at minimum you need to supply controls for entering these.
Dec 13 '11 #4
It seems to be working for the most part. A few issues:

The Combo box control is pulling up repeats. (data is alread in the database).

For example in my CmbCity combo box for city it pulls:
Expand|Select|Wrap|Line Numbers
  1. City A
  2. City A
  3. City B
  4. City B
  5. City B
I only want each city to show up once in the selection.

Originally I had this set up with several lookups. This cause a great deal of extra relationships. The structure was not managable.

*FIXED* I fixed the repetitive entries by adding this as my Row Source:

Expand|Select|Wrap|Line Numbers
  1. SELECT distinct [field] FROM [Table] ORDER BY [field]
However, I cannot select an entry to place in the combo box. It is just a dead click. Hmmm.

*Fixed* The ControlSource was incorrect.
Dec 15 '11 #5
Thanks for your help, Pat!
Dec 15 '11 #6
patjones
931 Expert 512MB
It's really no problem. Please feel free to post again if you have other questions in regard to your project! (Make it a new thread if it's about something unrelated to this issue).
Dec 15 '11 #7

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

Similar topics

2
by: Manlio Perillo | last post by:
Hi. This post follows "does python have useless destructors". I'm not an expert, so I hope what I will write is meaningfull and clear. Actually in Python there is no possibility to write code...
1
by: Glabbeek | last post by:
I'm changing the layout of my site. Instead of using tables, I will use DIVs. It's working fine, except for 1 thing: In IE6 some DIVs are not the correct width. Mozilla and Opera are showing the...
5
by: Robert Downes | last post by:
I'm using the following in a page that I'm testing in Mozilla: p.actionLinkBlock {border: 1px #000000 dashed; padding: 0.2cm; width: auto} But the dashed border is extending to the right-edge...
20
by: Vijay Kumar R. Zanvar | last post by:
Hello, Unlike register, auto keyword can not be used to declare formal parameter(s). Is there any specific reason for this? Kind regards, Vijay Kumar R. Zanvar
5
by: Samuel | last post by:
Hi, I am running into a problem of mixing UICulture = auto and allowing users to select culture using a dropdown list. I am detecting a querystring, "setlang", and when found, setting the...
5
by: maya | last post by:
at work they decided to center divs thus: body {text-align:center} #content {width: 612px; text-align:left; margin: 0 auto 0 auto; } this works fine in IE & FF, EXCEPT in FF it doesn't work if...
22
by: nospam_news | last post by:
I currently get asked about my usage of "auto". What is it for? The keyword is clearly superflous here. In contrast to the huge majority of C/C++ developers I write definitions very explicitly...
2
by: Piotr K | last post by:
Hi, I've encountered a strange problem with Firefox which I don't have any idea how to resolve. To the point: I've <divelement with a style "height: auto" and I want to retrieve this value...
1
by: neridaj | last post by:
Hello, I've found a few postings of this problem but none of the answers seem to fix my problem. I have a content div wrapped around a left floated image and a right floated table. I want the...
21
by: JOYCE | last post by:
Look the subject,that's my problem! I hope someone can help me, thanks
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.