% ' ***** Initialize Query ***** Dim ConnStr Dim Conn Dim rs Dim SQL Dim RdexID Dim TrackID ' *************************************** ' Connect to Database ' *************************************** connectdb ' *************************************** ' Select Key Information ' *************************************** SQL = "SELECT Name, " SQL = SQL & "ID " SQL = SQL & "FROM Keys " ' SQL = SQL & "Where Name = 'Rdex' " ' SQL = SQL & "OR Name = 'Track' " ' ***** Run Query ***** Set rs = Conn.Execute(SQL) do until rs.eof if not isnull(rs.fields("Name")) then if trim(rs.fields("Name")) = "Rdex" then RdexID = rs.fields("ID") elseif trim(rs.fields("Name")) = "Track" then TrackID = rs.fields("ID") end if end if rs.movenext loop rs.close set rs = nothing conn.close set conn = nothing %>