Can't see any error. Just a thought though, name your query and variables differently. Since you haven't scoped ClassName in your second query, CF may be getting confused. Try this: <!--- Select class name and description ---> <cfquery datasource="blah" name="ClassName"> SELECT c.ID, c.TableName, c.CourseName, sd.StudentID, sd.LastName, sd.FirstName FROM Classes c, StudentData sd WHERE c.TableName = sd.TableName AND c.TableName = '#ClassName#' ORDER BY sd.LastName </cfquery> I don't know your schema, but this assumes that the class name is stored in the TableName field on both your tables. Later, Jon -----Original Message----- From: Minh Lee Goon [mailto:v7ac at sdsumus.sdstate.edu] Sent: 25 September 2000 21:53 To: evolt Subject: [thelist] ColdFusion Question Dear evolters, I really need your help here. You can view what I have at http://188.8.131.52/scs/training/admin/Cadmin.cfm I have a database of student information and some of the columns have been given names like Access2000 and Excel2000 to denote the training classes for which they have signed up. In those columns are the dates of the classes. The names of those columns are also names of separate tables (which may be my downfall), in which are stored the dates of that class. For example, the Access2000 table would contain the dates and times of Access 2000 classes. Now, I've got the registration form pretty much done. I'm working on the administration area to give our training coordinator access to print off attendance sheets, ie the names of the people who have signed up for each class. Here's what I have: <cfset ClassName="#url.Class#"> <!--- Select class name and description ---> <cfquery datasource="blah" name="ClassName"> SELECT ID, TableName, CourseName FROM Classes WHERE TableName = '#ClassName#' </cfquery> <!--- Select list of student in that class ---> <cfquery datasource="blah" name="StudentsList"> SELECT StudentID, LastName, FirstName, #ClassName# FROM StudentData ORDER BY LastName </cfquery> I'm stuck here. Any suggestions at all? Thanks in advance. </ml> --------------------------------------- For unsubscribe and other options, including the Tip Harvester and archive of TheList go to: http://lists.evolt.org Workers of the Web, evolt !