
November 25th, 2012, 07:53 AM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 16
Time spent in forums: 4 h 26 m 16 sec
Reputation Power: 0
|
|
|
Microsoft VBScript compilation (0x800A0401) Expected end of statement
Hi,
I have a dropdownlist and from that ddl if I choose one of the fields
and submit, all of that fields data come out. Like search filter.
My code is as follow but I dont know why I got above error.
Please, can anyone advice me. Thanks in advanced.
Artistic_Fields = Trim(Request("Artistic_Fields"))
If IsFields(Artistic_Fields) Then
sql = sql & "AND (rs("Artistic_Field_Film") = #" & Artistic_Fields & "#) " [highlight]////// The error is show up here end of line before " (double code)
End If
If IsFields(Artistic_Fields) Then
sql = sql & "AND (rs("Artistic_Field_Literary_Arts") = #" & Artistic_Fields & "#) "
End If
If IsFields(Artistic_Fields) Then
sql = sql & "AND (rs("Artistic_Field_Dance") = #" & Artistic_Fields & "#) "
End If
If IsFields(Artistic_Fields) Then
sql = sql & "AND (rs("Artistic_Field_Music") = #" & Artistic_Fields & "#) "
End If
If IsFields(Artistic_Fields) Then
sql = sql & "AND (rs("Artistic_Field_Theatre") = #" & Artistic_Fields & "#) "
End If
If IsFields(Artistic_Fields) Then
sql = sql & "AND (rs("Artistic_Field_Visual_Arts") = #" & Artistic_Fields & "#) "
End If
If IsFields(Artistic_Fields) Then
sql = sql & "AND (rs("Artistic_Field_Others") = #" & Artistic_Fields & "#) "
End If
<td>
<b>Artistic Field(s): </b>
<select name="Artistic_Fields" size="1" width="60" class="formfield">
<option>- All Fields -</option>
<option value="Film" <% If Artistic_Fields = "Film" Then Response.Write "selected" %>>Film</option>
<option value="Literary Arts" <% If Artistic_Fields = "Literary Arts" Then Response.Write "selected" %>>Literary Arts</option>
<option value="Dance" <% If Artistic_Fields = "Dance" Then Response.Write "selected" %>>Dance</option>
<option value="Music" <% If Artistic_Fields = "Music" Then Response.Write "selected" %>>Music</option>
<option value="Theatre" <% If Artistic_Fields = "Theatre" Then Response.Write "selected" %>>Theatre</option>
<option value="Visual Arts" <% If Artistic_Fields = "Visual Arts" Then Response.Write "selected" %>>Visual Arts</option>
<option value="Others" <% If Artistic_Fields = "Others" Then Response.Write "selected" %>>Others</option>
</select>
</td>
|