Tuesday, December 4, 2007

How to use SELECT...MULTIPLE or a group of same-named checkboxes and turn it into a query

How to use SELECT...MULTIPLE or a group of same-named checkboxes and turn it into a query

To use SELECT...MULTIPLE or a group of same-named checkboxes and turn it into a query

When you want to select multiple options for a query, this is what you should do.



Select one or more makes:


Check the years you want to see reports for:
1997
1998
1999
2000
2001



<%

years = Request("ReportYear")
SQL = "SELECT make, reportYear, rating, comments " _
& "FROM carReportsTable " _
& "WHERE reportYear IN (" & years & ")"


Set RS = yourConnection.Execute( SQL )

%>

Now, that you have finished, you can use multiple values for your query.

No comments: