Alle årets måneder er helt ok med undtagelse af december måned. I
december måned vises kun aktiviteter for 1. december fra
databasen. Kan nogen se hvorfor?
<%
Dim Conn
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&
Server.MapPath("data/skole.mdb")
Dim SQL
SQL = "SELECT * FROM kalender WHERE Manad = "& Month(dbDatum)&"
AND Ar = "& Year(dbDatum) &" ORDER BY Dag ASC"
Dim Recset
Set Recset = Server.CreateObject("ADODB.Recordset")
Recset.Open SQL, Conn, 1, 2
%>
<%
Dim iAntalInbokningar
dim datumet
iAntalInbokningar = 0
Dim iRaderLoop, iKolumnerLoop
For iRaderLoop = 1 to iRader
Response.Write "<tr>"
For iKolumnerLoop = 1 to iKolumner
If aDagar((iRaderLoop-1)*7 + iKolumnerLoop) > 0 Then
Response.Write "<td valign=top bgcolor=#f6faf6 align=right
width=""14%"" & height=" & FormatPercent(1/iRader,0) & ">"
Response.Write "<table cellspacing=0 cellpadding=0
border=0 " & "width=""100%"">"
Response.Write "<tr><td align=right valign=top><b>"
Response.Write "<font face=verdana size=""1""><b>"
Response.Write aDagar((iRaderLoop-1)*7 + iKolumnerLoop)
Response.Write "</b></font>"
Response.Write "</b></td></tr>"
If Not Recset.EOF Then
If Recset("bruger") = (brugere.Fields.Item("bruger").Value)
Then
If Recset("Dag") = aDagar((iRaderLoop-1)*7 + iKolumnerLoop)
Then
Response.Write "<tr height=""100%""><td valign=top
align=center>"
Response.Write "<font size=1 face=verdana>"%>
<a
href="javascript:show('show.asp?ar=<%=RecSet("Ar")%>&manad=<%=Rec
Set("Manad")%>&dag=<%=RecSet("Dag")%>');">Aktivitet</a>
<%RecSet.MoveNext
iAntalInbokningar = iAntalInbokningar + 1
Response.Write "</font>"
Response.Write "</td></tr>"
End If
End If
End If
Response.Write "</table>"
Response.Write "</td>"
Else
Response.Write "<td bgcolor=#ffffff> </td>"
End If
Next
Response.Write "</tr>"
Next
Recset.Close
Set Recset = Nothing
Conn.Close
Set Conn = Nothing
%>
--
Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP ???
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials