Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiple records with one form

Status
Not open for further replies.

qasmi

Programmer
Feb 19, 2004
9
PK
I am using asp and ms access. I submit a form where are different field which submit to a ms access table....things are fine and its working but now I need to submit the same form like this :

lets suppose there are 8 total fields and all are text fields except one which is a list box which contains different categories. when a user fill up a form and in the list box selects more than one category then it should submit the records against every category I mean all fields and then the category. if there is one category selected it will add one record row and if there are 4 categories selected it will add 4 record rows. any ideas....
thanks in advance!

Regards,
Qasim
 
<input name="name">
Code:
<select name="val" multiple size=5>
 <option value="v1">V1
 <option value="v2">V2
 <option value="v3">V3
...
</select>

<%
for i=0 to Request.Form("val").Count -1
 name=Request("name")
 val=Request.Form("val")(i)
 'insert data to database
next
%>

________
George, M
Searches(faq333-4906),Carts(faq333-4911)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top