<% sSQL = "SELECT * FROM TblLogin where AccessLevel = '2' or AccessLevel = '6'" Set rs = Server.CreateObject("ADODB.Recordset") rs.Open sSQL, objADO, 1, 3 IF (RS.EOF) THEN %> <% Else rndMax = CInt(RS.RecordCount) RS.MoveFirst Do While Not RS.EOF RS.MoveNext Loop RS.MoveFirst Randomize Timer rndNumber = Int(RND * rndMax) RS.Move rndNumber 'UrlTo = RS("LinkTo") 'GetImg = RS("ImgUrl") 'WriteSize1 = RS("SizeOf1") 'WriteSize2 = RS("SizeOf2") 'DisText = RS("TextUnder") 'ImpNow = RS("ImpNow") 'ImpNewNow = ImpNow + 1 End If %>