<% 'Change this to whatever project this calendar is for strPlace ="McHenry" %> McHenry County Legacy Planning ") 'Response.Write(" ") 'Response.Write(" ") 'Response.Write(" ") SQL = "SELECT * FROM calendar WHERE Place = '" & strPlace & "' AND Date >=#" & StartDate & "# ORDER BY Date" RsQuery.Open SQL, Conn, 3, 3 If RsQuery.RecordCount > 0 Then RsQuery.MoveFirst %>

HOME
MODEL

ENGAGEMENT

CONTACT
click to close click to close click to open click to open Click to Open
[calendar] [archives] [administer calendar]
<% 'Should move these initializations to global.asa in the final version months = Array("","January","February","March","April","May","June","July","August","September","October","November","December") days = Array(0,31,28,31, 30, 31, 30, 31, 31, 30, 31, 30, 31) weekdays= Array("", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday") Set Conn = Server.CreateObject("ADODB.Connection") accessdb = "E:\Databases\LEAMsop.mdb" strConn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" strConn = strConn & accessdb & ";" Conn.Open strConn ' On Error Resume Next Set RsQuery = Server.CreateObject("ADODB.Recordset") thisMonth = Month(Now) 'Changed this from 0 to start at current month thisYear = Year(Now) StartDate = thisMonth & "/1/" & thisYear If thisMonth = 2 AND ((thisYear MOD 4) = 0) Then EndDate = "2/29/" & thisYear Else EndDate = thisMonth & "/" & days(thisMonth) & "/" & thisYear End If 'Response.Write(months(thisMonth) & ", " & thisYear & "
  
<% ' ' ") Response.Write(" ") Response.Write(" ") Response.Write(" ") End If isFirst = FALSE 'i = 1 Response.Write("") Response.Write("") 'i = i + 1 RsQuery.MoveNext Wend %>
isFirst = TRUE While NOT RsQuery.EOF hasChanged = FALSE If CDate(RsQuery("Date")) > CDate(EndDate) Then hasChanged = TRUE thisMonth = thisMonth + 1 if thisMonth > 12 Then thisMonth = 1 thisYear = thisYear + 1 End If StartDate = thisMonth & "/1/" & thisYear If thisMonth = 2 AND ((thisYear MOD 4) = 0) Then EndDate = "2/29/" & thisYear Else EndDate = thisMonth & "/" & days(thisMonth) & "/" & thisYear End If End If If hasChanged or isFirst Then %>
<% Response.Write(months(thisMonth) & ", " & thisYear & "  
") Response.Write(RsQuery.Fields("Description")) Response.Write("") arrWhen = Split(FormatDateTime(RsQuery.Fields("Date"),1),",") Response.Write(arrWhen(0) & "
" & arrWhen(1)) Response.Write("
") Response.Write(RsQuery.Fields("Location")) Response.Write("
<% Else Response.Write("No events in archive") End If RsQuery.Close Conn.Close %>

   
 
Please contact our Webmaster if you have any questions about navigating the LEAM web


 
click to close MODEL HOME GROUP WEB LINKS