?
Solved

select boxes

Posted on 2000-03-24
2
Medium Priority
?
211 Views
Last Modified: 2013-12-24
I am having a problem using a select box.
I have several select boxes or list boxes (vb) on my form which list data from tables.
How do I set the select box so that a user has the option to enter or in the best case delete  a value from the box which is set to a default value of my first item in the list.
Is this possible or has this been set up this way for referential integrity??
Should I be using a cfselect rather than a select??

0
Comment
Question by:acampoma
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
fallon12345 earned 200 total points
ID: 2655144
The best way, IMO, is to append a none to the list.

ie.
select company_name,company_number
from company
union
select "None",-1 from comapany

Then use this query to populate your list box.
This will add a none option to the list box.

Then in your page that writes the record:

<cfif complist NEQ "-1">
<cfset company_number=#complist#>
<cfelse>
<cfset company_number=null>
</cfif>

Insert into contact (fname,lname,company_number)
values
('#fname#','#lname#',#company_number#)
0
 
LVL 6

Author Comment

by:acampoma
ID: 2655413
Great thanks alot!!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question