Good day - I ended up not being happy with the possibility of fewer records. Here is the loop within the loop which ensures the correct number of records are retrieved and displayed. I thought to post is incase it helps someone else. It works well and is about th most effcient way I thought to code it.
<% dim recCount
if not getInfo.eof then %>
<tr>
<td class="Header5">Lic #</tD>
<td class="Header5">Licence Category</tD>
<td class="Header5">Licence Type</td>
<td class="Header5">Last Modified</td>
<td class="Header5">Applicant Name</tD>
<% do until getInfo.eof %>
<tr>
<td><%= trim(getInfo(1)) %></a></tD>
<td><%= trim(getInfo(3)) %></td>
<td><%= trim(getInfo(4)) %></td>
<td><%= auDate(getInfo(5)) %></td>
<td><%= trim(getInfo(6)) & " " & trim(getInfo(7)) %></td>
</tr>
<% getInfo.moveNext
recCount = recCount + 1
loop
do until (cint(recCount) = cint(howManyRecords))
RANDOMIZE
randomNum2= Int((getTopID(0) - getBotID(0) + 1) * Rnd + getBotID(0))
sql = "SELECT licence.licenceID,licence.licenceNumber,licenceTyp e.categoryID,category.categoryDesc,licenceType.lic enceTypeDesc,licence.dateTimeStamp,entity.name1,en tity.name2 FROM ((((licence LEFT OUTER JOIN licenceType ON licence.licenceTypeID = licenceType.licenceTypeID)LEFT OUTER JOIN entity ON licence.holderID = entity.entityID)LEFT OUTER JOIN category ON licenceType.categoryID = category.categoryID)LEFT OUTER JOIN vwLicCurrentStatus ON licence.licenceID = vwLicCurrentStatus.licenceID) WHERE ((licence.licenceID = " & randomNum2 & ") AND licence.licenceID NOT IN (" & Left(randomNumString,Len(randomNumString)-1) & ") AND (vwLicCurrentStatus.isLicensed=1)); "
set getInfo = conn.execute(sql)
if not getInfo.eof then %>
<tr>
<td><%= trim(getInfo(1)) %></a></tD>
<td><%= trim(getInfo(3)) %></td>
<td><%= trim(getInfo(4)) %></td>
<td><%= auDate(getInfo(5)) %></td>
<td><%= trim(getInfo(6)) & " " & trim(getInfo(7)) %></td>
</tr>
<% recCount = recCount + 1
end if
loop
end if %>
Wind is your friend
Matt
www.elitemarquees.com.au