Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set Limit to List=no in combo box, but still relate tables

Status
Not open for further replies.

ruthcali

Programmer
Apr 27, 2000
470
US
i am using Access97.

i have a Personnel database.

Some employees are contractors and i have a 'contractor id' number field in my Main information table.

then in my Contractor table, i have fields such as Contractor ID, Contractor Agency Name, Contractor Address, etc.

i have a one to many relationship between the Main table and the Contractor table linked on Contractor id .

so far, so good.

the problem is in the form. i have a combo box for the user to choose a contractor. i want the user to be able to enter a new contractor directly in the combo box. but the bound field of the combo box is a number field. so Access doesn't accept this.

i know i am creating this database the correct way, but i want the user to be able to enter a new contractor straight into the combo box.

is this possible?

thanks,
[sig][/sig]
 
Wouldn't it be easier to create separate text boxes and when the user clicks the button it enters it into the database and shows it in the combo box. Combo box are as far as I know selection only. You could however have the user double click the combo box and then enter the information.
The problem is that certain software allows this sort of entry. If you are programming with C/C++ you might have noticed that far more properties and functions are exposed to the programmer than they are in other languages, especially to VBA. [sig][/sig]
 
The way I've gotten around this problem is to allow the user to double-click on the combo box to open the "Add new Contractor" form. When saving the new contractor, the Combo box is refreshed and the new contractor is there...

Hope this helps... [sig]<p>Phooey<br><a href=mailto:Andrew.j.harrison@capgemini.co.uk>Andrew.j.harrison@capgemini.co.uk</a><br>Otherwise known as Windy Bottom.[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top