I am currently opening up a database and checking to see whether time slots for a meeting are open or closed, depending whether they are or not I have a response, but since there are 15 I currently have 15 if/then statements how could I shorten this?<BR><BR><%<BR> set cnDBConn = Server.CreateObject("ADODB.Connection")<BR> cnDBConn.Open "dsn=entrepreneur;uid=sa;pwd="<BR> <BR> SQL = "SELECT * FROM events WHERE eventdate = " & "'" & strEvent & "'"<BR> Set QueryTable = cnDBConn.Execute(SQL)<BR> <BR> 'declare value of the slot variables<BR> strSlot1 = trim(QueryTable("Slot1"))<BR> strSlot2 = trim(QueryTable("Slot2"))<BR> strSlot3 = trim(QueryTable("Slot3"))<BR> strSlot4 = trim(QueryTable("Slot4"))<BR> strSlot5 = trim(QueryTable("Slot5"))<BR> strSlot6 = Trim(QueryTable("Slot6"))<BR> strSlot7 = Trim(QueryTable("Slot7"))<BR> strSlot8 = Trim(QueryTable("Slot8"))<BR> strSlot9 = Trim(QueryTable("Slot9"))<BR> strSlot10 = Trim(QueryTable("Slot10"))<BR> strSlot11 = Trim(QueryTable("Slot11"))<BR> strSlot12 = Trim(QueryTable("Slot12"))<BR> strSlot13 = Trim(QueryTable("Slot13"))<BR> strSlot14 = Trim(QueryTable("Slot14"))<BR> strSlot15 = Trim(QueryTable("Slot15"))<BR> <BR> if strSlot1 = "open" then<BR> Response.Write "9:00am - 9:12am" & " = " & strSlot1 & " | Check box to sign up " & "<input type='checkbox' name='sign-up' value='Slot1'><BR>"<BR> else<BR> Response.Write "9:00am - 9:12am" & " = " & strSlot1 & "<BR>"<BR> end if<BR> if strSlot2 = "open" then <BR> Response.Write "9:12am - 9:24am" & " = " & strSlot2 & " | Check box to sign up " & "<input type='checkbox' name='sign-up' value='Slot2'><BR>"<BR> else<BR> Response.Write "9:12am - 9:24am" & " = " & strSlot2 & "<BR>"<BR> end if<BR> if strSlot3 = "open" then<BR> Response.Write "9:24am - 9:36am" & " = " & strSlot3 & " | Check box to sign up " & "<input type='checkbox' name='sign-up' value='Slot3'><BR>"<BR> else<BR> Response.Write "9:24am - 9:36am" & " = " & strSlot3 & "<BR>"<BR> end if<BR> if strSlot4 = "open" then<BR> Response.Write "9:36am - 9:48am" & " = " & strSlot4 & " | Check box to sign up " & "<input type='checkbox' name='sign-up' value='Slot4'><BR>"<BR> else<BR> Response.Write "9:36am - 9:48am" & " = " & strSlot4 & "<BR>"<BR> end if<BR> if strSlot5 = "open" then<BR> Response.Write "9:48am - 10:00am" & " = " & strSlot5 & " | Check box to sign up " & "<input type='checkbox' name='sign-up' value='Slot5'><BR>"<BR> else<BR> Response.Write "9:48am - 10:00am" & " = " & strSlot5 & "<BR>"<BR> end if<BR> if strSlot6 = "open" then<BR> Response.Write "10:00am - 10:12am" & " = " & strSlot6 & " | Check box to sign up " & "<input type='checkbox' name='sign-up' value='Slot6'><BR>"<BR> else<BR> Response.Write "10:00am - 10:12am" & " = " & strSlot6 & "<BR>"<BR> end if<BR> if strSlot7 = "open" then<BR> Response.Write "10:12am - 10:24am" & " = " & strSlot7 & " | Check box to sign up " & "<input type='checkbox' name='sign-up' value='Slot7'><BR>"<BR> else<BR> Response.Write "10:12am - 10:24am" & " = " & strSlot7 & "<BR>"<BR> end if<BR> if strSlot8 = "open" then<BR> Response.Write "10:24am - 10:36am" & " = " & strSlot8 & " | Check box to sign up " & "<input type='checkbox' name='sign-up' value='Slot8'><BR>"<BR> else<BR> Response.Write "10:24am - 10:36am" & " = " & strSlot8 & "<BR>"<BR> end if<BR> if strSlot9 = "open" then<BR> Response.Write "10:36am - 10:48am" & " = " & strSlot9 & " | Check box to sign up " & "<input type='checkbox' name='sign-up' value='Slot9'><BR>"<BR> else<BR> Response.Write "10:36am - 10:48am" & " = " & strSlot9 & "<BR>"<BR> end if<BR> if strSlot10 = "open" then<BR> Response.Write "10:48am - 11:00am" & " = " & strSlot10 & " | Check box to sign up " & "<input type='checkbox' name='sign-up' value='Slot10'><BR>"<BR> else<BR> Response.Write "10:48am - 11:00am" & " = " & strSlot10 & "<BR>"<BR> end if<BR> if strSlot11 = "open" then<BR> Response.Write "11:00am - 11:12am" & " = " & strSlot11 & " | Check box to sign up " & "<input type='checkbox' name='sign-up' value='Slot11'><BR>"<BR> else<BR> Response.Write "11:00am - 11:12am" & " = " & strSlot11 & "<BR>"<BR> end if<BR> if strSlot12 = "open" then<BR> Response.Write "11:12am - 11:24am" & " = " & strSlot12 & " | Check box to sign up " & "<input type='checkbox' name='sign-up' value='Slot12'><BR>"<BR> else<BR> Response.Write "11:12am - 11:24am" & " = " & strSlot12 & "<BR>"<BR> end if<BR> if strSlot13 = "open" then<BR> Response.Write "10:24am - 10:36am" & " = " & strSlot13 & " | Check box to sign up " & "<input type='checkbox' name='sign-up' value='Slot13'><BR>"<BR> else<BR> Response.Write "11:24am - 11:36am" & " = " & strSlot13 & "<BR>"<BR> end if<BR> if strSlot14 = "open" then<BR> Response.Write "10:36am - 10:48am" & " = " & strSlot14 & " | Check box to sign up " & "<input type='checkbox' name='sign-up' value='Slot14'><BR>"<BR> else <BR> Response.Write "11:36am - 11:48am" & " = " & strSlot14 & "<BR>"<BR> end if<BR> if strSlot15 = "open" then<BR> Response.Write "11:48am - 12:00am" & " = " & strSlot15 & " | Check box to sign up " & "<input type='checkbox' name='sign-up' value='Slot15'><BR>"<BR> else<BR> Response.Write "11:48am - 12:00am" & " = " & strSlot15 & "<BR>"<BR> end if<BR> <BR> If QueryTable.EOF then<BR> Response.Write "We have no events"<BR> else<BR> end if<BR>%