MyRS.MoveNext
in the Do While
loop and thecValueList = "" do while not MyRs.EOF cValueList = cValueList + MyRS.Fields("<field_name_here>").value + "," <b>MyRS.MoveNext</b> enddo * strip the last comma and add quote cValueList = left(cValueList, len(cValueList)-1) * (you may need to enclose values in quotes, depending the column types being integers or strings) MySql = "Select * From MyTable Where IdNo IN (" + cValueList + ")" nResult = SqlExec(nHandle, MySql)HTH