Here it is with as much explanation as to what I'm trying to do as possible. If anyone could help me figure this out I would appreciate it.<BR><BR>In a nutshell, I'm building a site for a radio station. I want to display the jock currently on the airs picture. The jocks schedule is kept in one table and the jocks info is stored in another table. Each jock has a unique id number and that is the common thread between each table. <BR><BR>'Here I'm trying to determine from the OnAir table what dj is currently on the air. This works. (when the full sql statement is intact)<BR><BR>Dim WhosOn<BR>WhosOn = "SELECT * FROM OnAir WHERE (omitted long sql statement)"<BR><BR>Dim WhosOnRS<BR>Set WhosOnRS = Conn1.Execute(WhosOn)<BR><BR>'From the above, I should have one record returned. I now want to take the jockid field from this record and match it with the jockid field from another table. <BR><BR>Dim JID<BR>JID = "Select * FROM Jocks WHERE jockid = WhosOnRS(" & jockid & ")"<BR><BR>Dim OnAirRS<BR>Set OnAirRS = Conn1.Execute(JID)<BR><BR>'Now I want to display the information from the Jocks table.<BR><BR>While Not OnAirRS.EOF<BR>%><BR><BR><table>� 60;tr><td><img src="<%=OnAirRS("small_pic_url")%>"> ;</td></tr></table><BR><BR><%<BR>OnAirRS.MoveNext<BR> WEND<BR>OnAirRS.close<BR>set OnAirRS=nothing<BR>closedb1<BR>%><BR><BR>I hope this is making sense to someone. I get the error: "Undefined function 'WhosOnRS' in expression". I've been searching for two hours trying to find an answer. Thanks in advance for your help!