<% Function qryCalendarByID( ByVal calendarID ) Dim Rs Dim strQuery strQuery = "SELECT * " & _ "FROM Calendar " & _ If isnumeric(calendarID) Then strQuery = strQuery & " WHERE calendarID = " & calendarID & " " End If strQuery = strQuery & "ORDER BY calendarDate DESC " set Rs = GetRecordset("", strQuery) Set qryCalendar = Rs End Function %>