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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box?????

Status
Not open for further replies.

DrmWvr

Programmer
Apr 2, 2002
22
0
0
CA
Hi guys,
is it possible to create a drop down list box that is populated from a database that will also input new entries?

Marc
Ottawa, Canada
 
sure.


The logic
1. You populate the dro-down box on the form with a recordset from your table
2. The .asp page processing the page will insert the value from the drop-down

Your insert statement will look like
insert into my table the values of request.form("field_name")




[sup]The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he who, in the name of charity and good will, shepherds the weak through the valley of the darkness. For he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee....
 
So you're saying that the user can only select from the list and cannot enter a new entry?

Marc
Ottawa, Canada
 
that's correct.

There are way around it. but it intails a bit of coding. In theory, you can have a different form that separate form perhaps in a layer that would populate the table and as soon as submitted the drop-down would contain the new entry. But I'm 99.99999% sure you can't type into a drop-down box. I believe there's a FAQ in this forum about this.

[sup]The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he who, in the name of charity and good will, shepherds the weak through the valley of the darkness. For he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee....
 
DrmWvr,

You can use a regular text box to submit additional entry. Let ASP process it on the back end to re-populate your dropdown box.
 
Got it.
Thanks anyway guys.
And have a good xmas holiday!!!

Marc
Ottawa, Canada
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top