[email protected] on Tuesday October 04 2005 at 15:11 +0000
wrote:
>Change <cfset TG =""> to <CFPARAM name="tg" default="">. Otherwise, you've
>clear TG before the second query.

Hi.  Many thanks for the advice. I have done as you have suggested but I'm
afraid it did not get me any further. If you have any other ideas I'd be
very grateful.
Code is now:
cfquery name="GetTG" datasource="sports_qs">
        SELECT tg
        FROM tblTg
</cfquery>
<CFPARAM name="TG" default="">
<cfquery name="getName" datasource="sports_qs">
        SELECT name, names_tg
        FROM tblNames
        WHERE names_tg = <cfqueryparam value='#TG#' cfsqltype="cf_SQL_VARchar">
</cfquery>
</head>
<body>


<table class="text">

</table>
        <hr>
        <table width="600" cellpadding="0" cellspacing="0" class="text">
                <tr>
                <td align="center">Out of School Club Participation 
Questionnaire</td>
        </tr>
        <tr>            
      <td align="left">* please fill in all required fields</td>
        </tr>
        </table>
        
  <table width="100%" bgcolor="#CCCCCC" cellpadding="2" cellspacing="0"
class="text">
    <!--- Select Tutor Group from table in database --->
    <tr> 
      <td valign="top">Tutor Group:</td>
          <td colspan="2">
                <cfselect size="1" name="TG" required="yes" class="smallform"
message="Please select your tutor group.">
                        <cfoutput query="GetTg"><option
value="#GetTg.tg#">#GetTg.tg#</option></cfoutput> 
                </cfselect>
        </td>
    </tr>
<!--- Field: Select Name from List generated by variable TG above by
filtering tblNames with that variable --->

        <tr>
        <td valign="top">Name:</td>
    <td colspan="2">
                <cfselect size="1" name="Name" required="yes" class="smallform"
message="Please select your name from the list.">
                        <cfoutput query="getName"><option
value="#getName.name#">#GetName.name#</option>                  </cfoutput> 
                </cfselect></td>
    </tr>

</table>
        <input type="submit" value="Submit" class="smallform">
        <input type="reset" value="Reset" class="smallform">
        <input type="submit" value="Cancel" class="smallform">
        </cfform>
</p>
Colin


Colin Coles
ICT Development Manager
John Cabot City Technology College
Tel 0117 976 3000 Ext 2112
Mobile: 07734395347
E Mail: [EMAIL PROTECTED]
Alt: [EMAIL PROTECTED]


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
All-in-one: antivirus, antispam, firewall for your PC and PDA. Buy Trend Micro 
PC-cillin Internet Security
http://www.houseoffusion.com/banners/view.cfm?bannerid=60

Message: http://www.houseoffusion.com/lists.cfm/link=i:15:1408
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to