Solved

select boxes

Posted on 2000-03-24
2
206 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 50 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

695 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