ElseIf TextSend.Text.Contains("next") Or TextSend.Text.Contains("NEXT") Or TextSend.Text.Contains("Next") ThenIf TextFrom.Text = "" Or TextTo.Text = "" ThenMsgBox("Please make sure you have entered in all the required fields", MsgBoxStyle.Exclamation)Elsestr4 = str6strArray4 = str4.Split("#")town = strArray4(2)str5 = strArray4(1)strArray5 = str5.Split("-")age1 = Convert.ToInt32(strArray5(0))age2 = Convert.ToInt32(strArray5(1)) myCmd1 = New SqlCommand("select top 3 * from (select row_number() over(order by Tel) as RowNumber,Tel,Name,Age,Sex,Town,Description from members) as myResults where RowNumber>'" & counter & "' and Sex='f' and Town ='" & town & "' and Age >= '" & age1 & "' and Age <= '" & age2 & "'", myCon)myCmd2 = New SqlCommand("select count Tel,Name,Age,Description from members where Sex='f' and Town ='" & town & "' and Age >= '" & age1 & "' and Age <= '" & age2 & "'", myCon)totalrows = CInt(myCmd1.ExecuteScalar())less = totalrows - 3counter = counter + 3 dr = myCmd1.ExecuteReader DoWhile dr.Readdis1 = (dr(1).ToString())dis2 = (dr(2).ToString())dis3 = (dr(3).ToString())dis4 = (dr(5).ToString())disall += dis2 & " aged " & dis3 & " " & dis1 & ","End While While dr.Readdis1 = (dr(1).ToString())dis2 = (dr(2).ToString())dis3 = (dr(3).ToString())dis4 = (dr(5).ToString())disall += dis2 & " aged " & dis3 & " " & dis1 & ","End While While dr.Readdis1 = (dr(1).ToString())dis2 = (dr(2).ToString())dis3 = (dr(3).ToString())dis4 = (dr(5).ToString())disall += dis2 & " aged " & dis3 & " " & dis1 & ","End While ' TextSend.Text = disall & ". Send next to 5001 to receive detailsof the remaining " & less & " ladies"Loop While dr.NextResult()TextSend.Text = disall & ". Send NEXT to 5001 to receive details of the remaining " & less & " ladies"count = count - 3End If