One other thing is you should do isDefined and provide a blank or default if it is not. Otherwise you get errors if the query returns a null for that field.
-----Original Message----- From: Ben Doom [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 10:05 AM To: CF-Talk Subject: RE: Populating a form with query results I generally do something like this: <cfquery name="foo"> select bar from table </cfquery> <cfoutput> <input name="newfoo" type="text" value="#foo.bar#"> </cfoutput> Hope that helps. Maybe my brain is in gear on this one. :-) --Ben Doom Programmer & General Lackey Moonbow Software : -----Original Message----- : From: Yexley Robert D Contr Det 1 AFRL/WSI : [mailto:[EMAIL PROTECTED]] : Sent: Monday, July 22, 2002 12:50 PM : To: CF-Talk : Subject: Populating a form with query results : : : I have a basic HTML form in a CF document, and I need to be able : to populate some of the fields on the form with the results of a : database query. I can't seem to find anywhere that explains how : to go about doing this. Could somebody point me in the right : direction? Thanks in advance. : : /* : || Robert D. Yexley : || Oracle Programmer/Analyst : || Easylink Services Corporation : || Professional Services : || Contractor - Wright Research Site MIS : || Det-1 AFRL/WSI Bldg. 45 Rm. 062 : || (937) 255-1984 : || [EMAIL PROTECTED] : || <)))>< : */ : : <<Robert D. Yexley (E-mail).vcf>> : : ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists