Auto Incrementing number display on form submit

M

Mangler

I dont know if this is possible or if someone has a better way to do
this but here it is:

I have a page where the user enters an rma#, lot#, and number of
barcodes they need to print, here is the code for the results page that

shows the barcodes to print:


<%
RMABarCode = Request.Form("idrma")
NoTimes = Request.Form("NoTimes")
If Len(RMABarCode)>0 Then
If IsNumeric(NoTimes) Then
For i = 1 to NoTimes
response.write "<div><img src='barcode.asp?code=" & RMABarCode &
"&height=25&width=1&mode=code39'></div>" & Request.Form("idrma") & "-"

& Request.Form("idlot") & "<p></p>"
Next
End If
End If
%>


So if the user entered rma# 1234, lot#1, and number of
barcodes(NoTimes) 3 it displays


(barcode) ** being the physical barcode **
1234-1 ** what is displayed under the barcode **
(barcode)
1234-1
(barcode)
1234-1


What i need to add is that each barcode has a unique number.
What i need it to display is:
(barcode)
1234-1(1)
(barcode)
1234-1(2)
(barcode)
1234-1(3)


The number of barcodes needed(NoTimes) is also going to be the unique
identity of the barcode...
Does that make sence?? If so, can it be done??


Thanks in advance.


Respectfully,
Danny
 
R

roger

RMABarCode = Request.Form("idrma")
NoTimes = Request.Form("NoTimes")
If Len(RMABarCode)>0 Then
If IsNumeric(NoTimes) Then
For i = 1 to NoTimes
response.write "<div><img src='barcode.asp?code=" & RMABarCode &
"&height=25&width=1&mode=code39'></div>" & Request.Form("idrma") & "-"
& Request.Form("idlot") & "<p></p>"
Next
End If
End If
What i need it to display is:
(barcode)
1234-1(1)
(barcode)
1234-1(2)
(barcode)
1234-1(3)

You already have the variable "i" which counts from 1 to NoTimes
For i = 1 to NoTimes
so you just need to display this. e.g.

& Request.Form("idlot") & "(" & i & ")<p></p>"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top