I will tell you now, I have a Do while part and a loop part. what the heck could be wrong?
The code can be seen at work at
Here is the part of my code in question:
The code can be seen at work at
Here is the part of my code in question:
Code:
Sub CalendarList
Set conn0 = Server.CreateObject("ADODB.Connection")
conn0.open DB_CONN
Set info = conn0.execute("select * from calendar where dowID = '" & WeekDay(CurrentDate) & "' AND " & SQLdate & " >= StartDate AND " & SQLdate & " <= EndDate order by time asc")
Do While Not info.eof
'Assign logical names to data types(info)
StartDate = info(0)
title = info(1)
StartTime = info(2)
blurb = info(3)
Description = info(4)
to_bring = info(5)
catID = info(6)
locID = info(7)
ID = info(8)
dowID = info(8)
EndDate = info(9)
EndTime = info(10)
RepID = info(11)
'RepId = 1 (means yearly)
' " = 2 (means monthly)
' " = 3 (means weekly)
If RepID = 1 And SQLdate = StartDate Then
Call Dates
ElseIf RepID = 2 Then
If DayOfMonth = 1 AND Day(CurrentDate) <= 7 Then
Call Dates
ElseIf DayOfMonth = 2 AND Day(CurrentDate) > 7 AND Day(CurrentDate) <= 14 Then
Call Dates
ElseIF DayOfMonth = 3 AND Day(CurrentDate) > 14 AND Day(CurrentDate) <= 21 Then
Call Dates
ElseIf DayOfMonth = 4 AND Day(CurrentDate) > 21 AND Day(CurrentDate) <= 28 Then
Call Dates
ElseIf DayOfMonth = 5 AND Day(CurrentDate) > 28 AND Day(CurrentDate) <= 31 Then
Call Dates
ElseIf DayOfMonth = 0 AND Day(CurrentDate) = Day(StartDate) Then
Call Dates
End If
ElseIf RepID = 3 Then
Call Dates
info.MoveNext
Loop
conn0.close
Set conn0 = Nothing
End Sub