Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
strNames = "'" & Replace(Request.QueryString("lboName"),", ","','") & "'"
vbscript said:"Name In (" & strNames & ")"
<form name="Member" onSubmit="return validatie(this);" METHOD="POST" ACTION="A_updB.asp">
<select multiple NAME="A_Id">
<%
rs.MoveFirst
Do While Not rs.EOF
%>
<option value="<%=rs("A_Id")%>">
<%=rs("A_Id")&". "&rs("A_Name")&" "&rs("A_member")%>
</option>
lngRecordNo = Request.Form("Rec")
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("database.mdb")
Set rs = Server.CreateObject("ADODB.Recordset")
SQL = "UPDATE TableA "&_
"SET A_Member = 0, A_UpDT = now() "&_
"WHERE A_Id=" & lngRecordNo
Response.Write(Request("A_Id"))
That's my problem: how should I convert my 'select multiple' in a 'format of request' with a correct syntax; in other words: how do I create a request format for/with more than one record (for example 4 or 5 or 9 ...) selected from the above-mentioned listbox?Once you know the format of the request, you can figure out how to use the value(s) in your update query.
<%
Response.write(Request.form("A_Id").count)
Response.write(Request.form("A_Id"))
%>
strRecordNos = Request.Form("A_Id")
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("database.mdb")
Set rs = Server.CreateObject("ADODB.Recordset")
SQL = "UPDATE TableA "&_
"SET A_Member = 0, A_UpDT = now() "&_
"WHERE A_Id IN (" & strRecordNos & ")"