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!

Flexible Combo Box

Status
Not open for further replies.

PDL

IS-IT--Management
Dec 11, 2000
36
0
0
US
Ideas please! I use a combo box on several forms. The OPTIONS in the dropdown list come from a query of the current items in the field of interest.

The users say they love that BUT would like to be able to select from what is currently in the column (from the query) OR would like to be able to add a new value (not one in the list).

This would enable the list to grow/shrink dynamically.

Thanks!

pdl
 
You'll have to give an example. What's in the box now? What do the users want to add to the box? Why do they want to add things to a combo box? If they do, you can store that new combo box entry in the DB, but then what? What's it tied to? What does it do for them.


Details... Kevin
slanek@ssd.fsi.com
 
You can display one select box and one text box. After entering the new value in the text box and when they hit submit button do the update in the database and display the same form back again
 
Yes, I agree, but what's the point. So you have a new entry in the select box. What does that do for you when you haven't tied it to anything.

In other words, put the word "dish" into the textbox, submit the form, it goes into the db, refresh the page, and voilla, you have "dish" in the select box. Big deal. Choosing "dish" from the select box would have no consequence. This is why I was asking for more details. Kevin
slanek@ssd.fsi.com
 
Here is an example...

User says, "I have five standard responses to put in the drop down box"... So, you build the combo with 5 possible selections.

Next week, "Oops, I really meant six"... so you rebult the box..

I want the combo box to display the GROUPED variables in the drop down box.... and IF the User wants to add a seventh response, they would enter this new response into the field.

The next time the user goes to maintain a record, a GROUP BY Query or SELECT DISTINCT Query would populate the dropdown and the user would see all SEVEN itmes in that field!

Now... if the user options to change this SEVENTH option in the cirrent record to one of the previous six, the next time the user wold attempt to update the record, we would be BACK to only six options to choose from!

i.e. I do not want to hardcode the selections (dropdowns) NOR write admin-code to maintain a separate table!

That help??
 
Uh, you're way too excited. First of all you're talking in circles.

First you said "... be able to select from what is currently in the column ... This would enable the list to grow/shrink dynamically."

And the last thing you said "I do not want to hardcode the selections (dropdowns) NOR write admin-code to maintain a separate table!"

What do you want? Kevin was asking why a user would have access to update your tables that all other users access. If that is not your goal, and you are talking Admin stuff here... what are you talking about?


 
It would not be "Admin" (in the sense a separate administrative action is occuring) if the user could, from the same dropdown box, either use what is displayed (i.e. the current list of distinct values for that column) or add a new value not currently in the distinct listing generated from the column.

Conditions:

1) He added a new value = adds to the current distinct values

2) He replaces a current value with another existing value (and the replaced value had one occurance) = a distinct value is deleted

I was looking for a more elegant solution than having two boxes, one select box genrated from the distinct list of valriables in the column and a second input box adjacent to it for new values.... and using some logic in the update query that would populate the column with a variable from the second box if it was not "" and ignore the select.

Does that help?

 
HEY GUYS,

I think I know what PDL meant. I was looking for the answer to this question and ran accros this old thread with no solution. For an example of the desired effect look at your address bar on your browser. From there you can enter a URL or you can hit the down arrow and select from a list of previously entered URLS. SO ... is it possible with CF? Can we make a <Select> box that also excepts text input as the option?

Sounds like fun! Anybody got the answer?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top