I have a form set up with 3 select lists where a user can select the date. and from there I insert it into one field in an Access database using this query.

<cfquery name="CheckDate" datasource="Rumors_Forms">
INSERT INTO BusTable (Name, Req_Date, Req_Time, Address, Email, PhoneNumber, Reason)
 Values('#form.Name#', '#form.Month#/#form.Day#/#form.Year#' ,'#form.Req_Time#','#form.Address#','#form.Email#','#form.PhoneNumber#','#form.Reason#')
</cfquery>

it inserts into the DB just fine, what I would like to do, is have all the information output to a form. The thing I am having problems with is getting the date to populate in 3 select lists. here is my code that I have for the select lists.

<td>Date:</td>
			<td><cfparam name="form.month" default="">	   <select name="Month">
		  <cfloop  index="month" from =1 to =12 >
             <cfif month EQ form.month>
                <cfoutput><option value="#month#" selected>#month#</option></cfoutput>
             <cfelse>
                <cfoutput><option value ="#month#">#month#</option></cfoutput> 
             </cfif>
          </cfloop>
       </select>
   
   <cfparam name="form.day" default="">

      <select name="Day">
	     <cfloop  index="day" from =1 to =31 >
            <cfif day EQ form.day>
               <cfoutput><option value="#day#" selected>#day#</option></cfoutput>
            <cfelse>
               <cfoutput><option value ="#day#">#day#</option></cfoutput> 
           </cfif>
        </cfloop>
      </select>

   <cfparam name="form.year" default="">

      <select name="Year">
	     <cfloop  index="year" from =2006 to =2010 >
            <cfif year EQ form.year>
               <cfoutput><option value="#year#" selected>#year#</option></cfoutput>
            <cfelse>
               <cfoutput><option value ="#year#">#year#</option></cfoutput> 
           </cfif>
        </cfloop>
      </select></td>

Any help would be great.
Thanks

I was able to get that problem solved

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.