Hej hopp! Om du alltid vill ha fem rader:BOF?
Hur skriver man om detta(villkor för BOF?) så att det fungerar även då det inte finns någon eller färre än fem poster i databasen. (Fungerar iofs nu med, men ger felmeddelande efter sista posten.(Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record)
Vad står BOF för?
Mvh Klas
<table width="360" border="1" cellpadding="0" cellspacing="0">
<% Dim Slinga %>
<% For Slinga = 1 To 5 %>
<tr>
<td width="180"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><% =RecSet("Rubrik")%></td>
<td width="130"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><% =RecSet("Namn")%></td>
<td width="50"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><% =RecSet("Datum")%></td>
</tr>
<% RecSet.MoveNext %>
<% Next %>
<%
RecSet.Close
Databas.Close
%>
</table>Sv: BOF?
<code>
<table width="360" border="1" cellpadding="0" cellspacing="0">
<%
Dim Slinga
For Slinga = 1 To 5
If RecSet.Eof Then
%>
<tr>
<td width="180"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"></td>
<td width="130"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"></td>
<td width="50"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"></td>
</tr>
<% Else %>
<tr>
<td width="180"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><% =RecSet("Rubrik")%></td>
<td width="130"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><% =RecSet("Namn")%></td>
<td width="50"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><% =RecSet("Datum")%></td>
</tr><%
RecSet.MoveNext
End If
Next
RecSet.Close
Databas.Close
%>
</table>
</code>