To which you could add:

<cfoutput>
<cfloop list="#queryname.columnlist#" index="fieldname">
   <tr><td>#fieldname#:</td>
       <td>#evaluate('queryname.#fieldname#')#</td></tr>
</cfloop>
</cfoutput>

> This does it for me
> 
> <cfloop list="#queryname.columnlist#" index="fieldname">
>       <td><cfoutput>#fieldname#</cfoutput></td>
> </cfloop>
> 
> Nick
> 
> -----Original Message-----
> From: Lockie Martin [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 09, 2001 2:36 AM
> To: CF-Talk
> Subject: Accessing field names dynamically
> 
> 
> This question comes into the category of I've seen it somewhere!
> 
> I have a crosstab query in Access and as you will be aware the column
> headings in that kind of query come from the data and of course will be
> variable in name and number.
> 
> Is there any way of accessing the field names for the columns from the
> query.  Perhaps looping through them to present them on the screen.
> 
> I know I have seen it somewhere!
> 
> Thanks in advance
> ---
> Lockie Martin 
> [EMAIL PROTECTED]
> http://www.keystone-solutions.com/ http://marquee/
> http://www.keystone-support.net
> PER [EMAIL PROTECTED]
> MSN [EMAIL PROTECTED]
> ICQ 19741013
> +64-9-357 0408 x339 (work) +64-2-174 3910 (cell)
> +64-9-357 0414 (work fax)
> 
> 
> **********************************************************************
> Information in this email is confidential and may be privileged. 
> It is intended for the addressee only. If you have received it in error,
> please notify the sender immediately and delete it from your system. 
> You should not otherwise copy it, retransmit it or use or disclose its
> contents to anyone. 
> Thank you for your co-operation.
> **********************************************************************
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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

Reply via email to