473,387 Members | 3,787 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.

How to implement autocomplete?

Ok, here's my situation:

I've got 2 tables, tblPeople and tblParents. tblPeople has parentID which references tblParents. Multiple people can have the same parents. I am developing the form for tblPeople and domain constraints prevent me from using a form/subform style. The recordsource of the form is tblPeople joined to tblParents and I have a combobox which displays parentName, but is bound to parentID. In addition, all fields in tblParents are displayed directly. This works perfectly when the parent exists, but I want to also be able to add new parents, and I want to use the same form to do it(a new form for creating parents is not an option). On the theoretical level, how do I accomplish this?
May 2 '08 #1
3 1766
PianoMan64
374 Expert 256MB
Ok, here's my situation:

I've got 2 tables, tblPeople and tblParents. tblPeople has parentID which references tblParents. Multiple people can have the same parents. I am developing the form for tblPeople and domain constraints prevent me from using a form/subform style. The recordsource of the form is tblPeople joined to tblParents and I have a combobox which displays parentName, but is bound to parentID. In addition, all fields in tblParents are displayed directly. This works perfectly when the parent exists, but I want to also be able to add new parents, and I want to use the same form to do it(a new form for creating parents is not an option). On the theoretical level, how do I accomplish this?
The way that you're describing it, there isn't a way to add parents unless there is a Mainform/SubForm concept.

Unless you're planning to have all the parents information loaded by another process, there isn't any way to do what you speak of.

Hope that helps,

Joe P.
May 2 '08 #2
Ugh, that's not what I wanted to hear. Anyway, this is what I've learned since I posted. If I make my combobox unbound, and have a stored procedure to update txtParentID(which is the hidden ID field within my form) in AfterUpdate of the combobox, then I can have my desired autocomplete functionality. I've also noticed that if my combobox is bound to ParentName and a new name is entered, then a brand new parent record is created in tblParents. I am currently working to merge these two bits of functionality.

Hmm, seems that the new parents are only created if it's a new person and they don't yet have parents.

I'm sure I can get this thing to work eventually....
May 2 '08 #3
NeoPa
32,556 Expert Mod 16PB
Have you considered implementing this a bit more logically?

By this I mean :
Parents are people too :)

What about losing the tblParents table completely and implementing a self-referencing tblPerson table instead?
May 5 '08 #4

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...
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...
2
by: it | last post by:
Hello. I want to implement Incremental find of TextBox by ASP.NET AJAX . Could you please teach me how to get it ? Thank you.
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: 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: 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: 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...
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
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
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.