Forums

This topic is locked

Insert multipe records based on a dropdown..WEIRD?

Posted 12 Aug 2003 05:50:40
1
has voted
12 Aug 2003 05:50:40 Mitchel Tendler posted:
I am using ASP/VBScript/Access DB.

OK, this is a weird one, I want to know if I can create a page that will
have 3 dropdowns:

- Course Code (pulled from a table in the database)
- Quarter: W, S, U or F
- Year: 03, 04, 05, 06, 07
- Number of copies: 1 though 10
- Session: "1" or "2"

This is the tricky part of how I would like it to work:

A person selects:

Course Code: ENG101
Quarter: U
Year: 04
Number of Copies: 3
Session: 1

When they click the SUBMIT button, the form needs to CREATE 3 New Records in
the DB Table in the column Course Code, like:

ENG101U04A
ENG101U04B
ENG101U04C

If you notice, the end of each course code is incremented by "1", A, B, C.
If they would have chosen Session "2", then the records would have to be:

ENG101U04N
ENG101U04O
ENG101U04P


Does anyone have an idea of how to do this? It seems like I would have to
use some type of looping variable based on the "Number of Copies" field, but
I have no idea where to begin. If need be, I could live without the auto
incrementing session A, B, C, it would just make life easier. Or I could have 2 pages, one for session 1 and one for session 2, those pages could have check boxes labeled "A" through "M" for session 1 and "N" through "Z" for session 2.

Thanks!

Mitch



When in doubt...reboot!

Reply to this topic