First you should be verifying that only one record can exist for each customer otherwise you will did yourself a hole. Second you need a way to identify the customer or transaction before you get to the page with the information. With that said. Run a query at the top of the page with the selection criteria that matches the customer with the information on the page. Then check qry_queryname.recordcount. If it is = 1 then it is an update. You can use "cfswitch" or "cfif" statements around the fields you need to update. Remember to trim those text and string fields when you set the value. Hope this helps. John Hancock -----Original Message----- From: Hubert Earl [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 12, 2001 11:48 PM To: CF-Talk Subject: How to make sure that 'select', 'textarea' and 'checkbox' data fields are filled from the database when performing an update? hi, i'm working on a form which will either add to or update the columns of an Access database. in order that the fields be filled with data already submitted if an update is to be done, i'm using the 'value' attribute for text input fields. however, i also have as input fields the 'select', 'textarea' and 'checkbox' data fields. how do i ensure that those fields are filled with data from the database, in the case of an update situation? the update will be performed when the form is passed to an action file which will use sql to perform the update. Below is the code i'm dealing with: <CFOUTPUT> <HTML> <HEAD> <TITLE>PROPOSAL FOR INSURANCE OF MONEY</TITLE> </HEAD> <BODY> <CFINCLUDE TEMPLATE="clicoheader.cfm"> <CENTER> <H1><U>CLICO</U></H1> <H3>INTERNATIONAL<BR> GENERAL INSURANCE<BR> LIMITED</H3> <H2>PROPOSAL FOR INSURANCE OF MONEY</H2> <B>i.e. Cash, Bank and Currency Notes, Cheques, Money Orders, Postal Orders, and Current Postage Stamps all belonging to the insured or for which he has accepted responsability</B> </CENTER> <FORM ACTION="clicomoninsformaction.cfm" METHOD="POST"> <TABLE BORDER=1 CELLSPACING=0 CELLPADDING=4> <TR> <TH COLSPAN=4> <U><H3>Name & Contact Information of Applicants</H3></U> </TH> </TR> <P> <TR> <TD> <B>First name:</B> </TD> <TD> <INPUT TYPE="text" NAME="CustFirstName" SIZE="30" MAXLENGTH="30" VALUE="#CustFirstName#"> </TD> <TD> <B>Middle Initial(s):</B> </TD> <TD> <INPUT TYPE="text" NAME="CustMiddleInit" SIZE="2" MAXLENGTH="1" VALUE="#CustMiddleInit#"> </TD> </TR> <TR> <TD> <B>Last name:</B> </TD> <TD> <INPUT TYPE="text" NAME="CustLastName" SIZE="30" MAXLENGTH="30" VALUE="#CustLastName#"> </TD> </TR> <TR> <TD> <B>Address1:</B> </TD> <TD> <INPUT TYPE="text" NAME="CustAddress1" SIZE="30" MAXLENGTH="50" VALUE="#CustAddress1#"> </TD> <TD> <B>Address2:</B> </TD> <TD> <INPUT TYPE="text" NAME="CustAddress2" SIZE="30" MAXLENGTH="50" VALUE="#CustAddress2#"> </TD> </TR> <TR> <TD> <B>City:</B> </TD> <TD> <INPUT TYPE="text" NAME="CustCity" SIZE="30" MAXLENGTH="40" VALUE="#CustCity#"> </TD> <TD> <B>Parish:</B> </TD> <TD> <INPUT TYPE="text" NAME="CustParish" SIZE="30" MAXLENGTH="50" VALUE="#CustParish#"> </TD> </TR> <TR> <TD> <B>Country:</B> </TD> <TD> <SELECT NAME="Country"><OPTION>Afghanistan<OPTION>Albania<OPTION>Algeria<OPTION>Amer ican Samoa<OPTION>Andorra<OPTION>Angola<OPTION>Anguilla<OPTION>Antarctica<OPTION> Antigua and Barbuda<OPTION>Argentina<OPTION>Armenia<OPTION>Aruba<OPTION>Australia<OPTION >Austria<OPTION>Azerbaijan<OPTION>Bahamas<OPTION>Bahrain<OPTION>Bangladesh<O PTION SELECTED>Barbados<OPTION>Belarus<OPTION>Belgium<OPTION>Belize<OPTION>Benin<O PTION>Bermuda<OPTION>Bhutan<OPTION>Bolivia<OPTION>Bosnia and Herzegovina<OPTION>Botswana<OPTION>Bouvet Island<OPTION>Brazil<OPTION>British Indian Ocean Territory<OPTION>Brunei Darussalam<OPTION>Bulgaria<OPTION>Burkina Faso<OPTION>Burundi<OPTION>Cambodia<OPTION>Cameroon<OPTION>Canada<OPTION>Cap e Verde<OPTION>Cayman Islands<OPTION>Central African Republic<OPTION>Chad<OPTION>Chile<OPTION>China<OPTION>Christmas Island<OPTION>Cocos (Keeling Islands)<OPTION>Colombia<OPTION>Comoros<OPTION>Congo<OPTION>Cook Islands<OPTION>Costa Rica<OPTION>Cote D'Ivoire (Ivory Coast)<OPTION>Croatia (Hrvatska)<OPTION>Cuba<OPTION>Cyprus<OPTION>Czech Republic<OPTION>Denmark<OPTION>Djibouti<OPTION>Dominica<OPTION>Dominican Republic<OPTION>East Timor<OPTION>Ecuador<OPTION>Egypt<OPTION>El Salvador<OPTION>Equatorial Guinea<OPTION>Eritrea<OPTION>Estonia<OPTION>Ethiopia<OPTION>Falkland Islands (Malvinas)<OPTION>Faroe Islands<OPTION>Fiji<OPTION>Finland<OPTION>France<OPTION>France, Metropolitan<OPTION>French Guiana<OPTION>French Polynesia<OPTION>French Southern Territories<OPTION>Gabon<OPTION>Gambia<OPTION>Georgia<OPTION>Germany<OPTION> Ghana<OPTION>Gibraltar<OPTION>Greece<OPTION>Greenland<OPTION>Grenada<OPTION> Guadeloupe<OPTION>Guam<OPTION>Guatemala<OPTION>Guinea<OPTION>Guinea-Bissau<O PTION>Guyana<OPTION>Haiti<OPTION>Heard and McDonald Islands<OPTION>Honduras<OPTION>Hong Kong<OPTION>Hungary<OPTION>Iceland<OPTION>India<OPTION>Indonesia<OPTION>Iran <OPTION>Iraq<OPTION>Ireland<OPTION>Israel<OPTION>Italy<OPTION>Jamaica<OPTION >Japan<OPTION>Jordan<OPTION>Kazakhstan<OPTION>Kenya<OPTION>Kiribati<OPTION>K orea (North)<OPTION>Korea (South)<OPTION>Kuwait<OPTION>Kyrgyzstan<OPTION>Laos<OPTION>Latvia<OPTION>Leb anon<OPTION>Lesotho<OPTION>Liberia<OPTION>Libya<OPTION>Liechtenstein<OPTION> Lithuania<OPTION>Luxembourg<OPTION>Macau<OPTION>Macedonia<OPTION>Madagascar< OPTION>Malawi<OPTION>Malaysia<OPTION>Maldives<OPTION>Mali<OPTION>Malta<OPTIO N>Marshall Islands<OPTION>Martinique<OPTION>Mauritania<OPTION>Mauritius<OPTION>Mayotte< OPTION>Mexico<OPTION>Micronesia<OPTION>Moldova<OPTION>Monaco<OPTION>Mongolia <OPTION>Montserrat<OPTION>Morocco<OPTION>Mozambique<OPTION>Myanmar<OPTION>Na mibia<OPTION>Nauru<OPTION>Nepal<OPTION>Netherlands<OPTION>Netherlands Antilles<OPTION>New Caledonia<OPTION>New Zealand<OPTION>Nicaragua<OPTION>Niger<OPTION>Nigeria<OPTION>Niue<OPTION>Norf olk Island<OPTION>Northern Mariana Islands<OPTION>Norway<OPTION>Oman<OPTION>Pakistan<OPTION>Palau<OPTION>Panama <OPTION>Papua New Guinea<OPTION>Paraguay<OPTION>Peru<OPTION>Philippines<OPTION>Pitcairn<OPTION >Poland<OPTION>Portugal<OPTION>Puerto Rico<OPTION>Qatar<OPTION>Reunion<OPTION>Romania<OPTION>Russian Federation<OPTION>Rwanda<OPTION>S. Georgia and S. Sandwich Isls.<OPTION>Saint Kitts and Nevis<OPTION>Saint Lucia<OPTION>Saint Vincent and The Grenadines<OPTION>Samoa<OPTION>San Marino<OPTION>Sao Tome and Principe<OPTION>Saudi Arabia<OPTION>Senegal<OPTION>Seychelles<OPTION>Sierra Leone<OPTION>Singapore<OPTION>Slovak Republic<OPTION>Slovenia<OPTION>Solomon Islands<OPTION>Somalia<OPTION>South Africa<OPTION>Spain<OPTION>Sri Lanka<OPTION>St. Helena<OPTION>St. Pierre and Miquelon<OPTION>Sudan<OPTION>Suriname<OPTION>Svalbard and Jan Mayen Islands<OPTION>Swaziland<OPTION>Sweden<OPTION>Switzerland<OPTION>Syria<OPTIO N>Taiwan<OPTION>Tajikistan<OPTION>Tanzania<OPTION>Thailand<OPTION>Togo<OPTIO N>Tokelau<OPTION>Tonga<OPTION>Trinidad and Tobago<OPTION>Tunisia<OPTION>Turkey<OPTION>Turkmenistan<OPTION>Turks and Caicos Islands<OPTION>Tuvalu<OPTION>US Minor Outlying Islands<OPTION>Uganda<OPTION>Ukraine<OPTION>United Arab Emirates<OPTION>United Kingdom<OPTION>United States<OPTION>Uruguay<OPTION>Uzbekistan<OPTION>Vanuatu<OPTION>Vatican City State (Holy See)<OPTION>Venezuela<OPTION>Viet Nam<OPTION>Virgin Islands (British)<OPTION>Virgin Islands (US)<OPTION>Wallis and Futuna Islands<OPTION>Western Sahara<OPTION>Yemen<OPTION>Yugoslavia<OPTION>Zaire<OPTION>Zambia<OPTION>Zimb abwe</SELECT> </TD> </TR> <TR> <TD> <B>Home Phone Number:</B> </TD> <TD> <INPUT TYPE="text" NAME="CustHomePhone" SIZE="20" MAXLENGTH="20" VALUE="#CustHomePhone#"> </TD> <TD> <B>Work Phone Number:</B> </TD> <TD> <INPUT TYPE="text" NAME="CustWorkPhone" SIZE="20" MAXLENGTH="20" VALUE="#CustWorkPhone#"> </TD> </TR> <TR> <TD> <B>Home Phone Number:</B> </TD> <TD> <INPUT TYPE="text" NAME="CustEmail" SIZE="30" MAXLENGTH="30" VALUE="#CustEmail#"> </TD> </TR> <TR> <TD> <B>Trade or Business:</B> </TD> <TD> <TEXTAREA NAME="CustBusiness" ROWS=5 COLS=10></TEXTAREA> </TD> </TR> </TABLE> <P> <TABLE BORDER=1 CELLSPACING=0 CELLPADDING=4> <TR> <TH COLSPAN=4> <U><H3>Details of Premises</H3></U> </TH> </TR> <TR> <TH COLSPAN=4> <H4>Address(es) where money is to be insured</H4> </TH> </TR> <TR> <TD> <B>Premises 1:</B> </TD> <TD> <INPUT TYPE="text" NAME="PremAddress1" SIZE="30" MAXLENGTH="50" VALUE="#PremAddress1#"> </TD> <TD> <B>Premises 2:</B> </TD> <TD> <INPUT TYPE="text" NAME="PremAddress2" SIZE="30" MAXLENGTH="50" VALUE="#PremAddress2#"> </TD> </TR> <TR> <TD> <B>City:</B> </TD> <TD> <INPUT TYPE="text" NAME="PremCity" SIZE="30" MAXLENGTH="40" VALUE="#PremCity#"> </TD> <TD> <B>Parish:</B> </TD> <TD> <INPUT TYPE="text" NAME="PremParish" SIZE="30" MAXLENGTH="50" VALUE="#PremParish#"> </TD> </TR> <TR> <TD> <B>Are the premises occupied at night?:</B> </TD> <TD> <INPUT TYPE="checkbox" NAME="PremNight" VALUE="Yes"> </TD> <TD> <B>If so, by whom?:</B> </TD> <TD> <TEXTAREA NAME="PremNightName" COLS="22" ROWS="5">"PremNightName"</TEXTAREA> </TD> </TR> <TR> <TH COLSPAN=4> <H4>Details of transits to and from the bank or post office to the premises</H4> </TH> </TR> <TR> <TD> <B>How far is the bank or post office from the premises?</B> </TD> <TD> <INPUT TYPE="text" NAME="PremDist" SIZE="10" MAXLENGTH="10" VALUE="#PremDist#">miles </TD> <TD> <B>How is the journey made, e.g. on foot or by public or private conveyance?</B> </TD> <TD> <INPUT TYPE="text" NAME="PremHowJourney" SIZE="30" MAXLENGTH="30" VALUE="#PremHowJourney#"> </TD> </TR> <TR> <TD> <B>What is the number of adult males in charge of each journey?</B> </TD> <TD> <INPUT TYPE="text" NAME="PremMaleNumber" SIZE="2" MAXLENGTH="2" VALUE="#PremMaleNumber#"> </TD> <TD> <B>What special precautions are taken?</B> </TD> <TD> <TEXTAREA NAME="PremPrecaution" COLS="22" ROWS="5">#PremPrecaution#</TEXTAREA> </TD> </TR> <TR> <TH COLSPAN=4> <U><H3>Miscellaneous information concerning the premises and the monies to be insured</H3></U> </TH> </TR> <TABLE BORDER=1 CELLSPACING=0 CELLPADDING=4> <TR> <TH COLSPAN=4> <U><H3>Name & Contact Information of Applicants</H3></U> </TH> </TR> <P> <!---Please ignore this <TR> <TD> <B>Sum to be insured any one loss in respect of crossed cheques, crossed money orders and crossed postal orders:</B> </TD> <TD> <INPUT TYPE="text" NAME="CustFirstName" SIZE="20" MAXLENGTH="20" VALUE="#CustFirstName#"> </TD> <TD> <B>Middle Initial(s):</B> </TD> <TD> <INPUT TYPE="text" NAME="CustMiddleInit" SIZE="2" MAXLENGTH="1" VALUE="#CustMiddleInit#"> </TD> </TR>---> </TABLE> <!---Please ignore this <P> <TR> <TD> <B>Username:</B> </TD> <TD> <INPUT TYPE="text" NAME="CustUserName" SIZE="30" MAXLENGTH="30" VALUE="#CustUserName#"> </TD> <TD> <B>Password:</B> </TD> <TD> <INPUT TYPE="password" NAME="CustPassword" SIZE="30" MAXLENGTH="20" VALUE="#CustPassword#"> </TD> </TR> ---> </FORM> </BODY> </HTML> </CFOUTPUT> --- Hubert Earl ICQ#: 16199853 AIM: hubertfme My Jamaican Art, Craft & More Online Store: http://www.angelfire.com/ny/hearl/link_page_on_angelfire.html ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

