Avatar of kwitcom
kwitcom
Flag for United States of America

asked on 

Check value of model number then do something based on that

I have to list of model numbers with about 10-15 different models each and if they are in list A then i need Label #1 printed and if in list B then I need Lable #2 printed.
Model Numbers for ETL
6100-LP
6100-MC
6100-PL
6100-PR
6100-SG
7100-LP
7100-MC
7100-PL
7100-PR
7100-SG
7102-LP
7102-MC
7102-PL
7102-PR
7102-SG
8100-LR
8100-MC
8100-PL
8100-PR
8100-SG
8102-LP
8102-MC
8102-PL
8102-PR
8102-SG
10100-LP
10100-MC
10100-PL
10100-PR
10100-SG
10102-LP
10102-MC
10102-PL
10102-PR
10102-SG

Model Numbers for CE
6200-LP
6200-MC
6200-PL
6200-PR
6200-SG
7200-LP
7200-MC
7200-PL
7200-PR
7200-SG
7202-LP
7202-MC
7202-PL
7202-PR
7202-SG
8200-LR
8200-MC
8200-PL
8200-PR
8200-SG
8202-LP
8202-MC
8202-PL
8202-PR
8202-SG
10200-LP
10200-MC
10200-PL
10200-PR
10200-SG
10202-LP
10202-MC
10202-PL
10202-PR
10202-SG

Plus I need it to still check to see if record exist in the label table, and if the value is > 0.
This is what I have right now but it does not look at the model numbers:
<%
     strSQL2 = "SELECT * FROM labels WHERE sf_ord = " & rs("ord_no")
     set rs2 = Conn.Execute(strSQL2)
if rs2.BOF AND rs2.EOF then%><b><font size="4">
<a target="_blank" href="labelprint.asp?ordno=<%= rs("ord_no") %>">Print First</a>

<%Elseif  rs2("zn_4") = 0 then %></font></b> <b>
<font size="4">
<a target="_blank" href="labelprint.asp?ordno=<%= rs("ord_no") %>">Print First</a>
</font><font size="2">

<%Elseif  rs2("zn_4") > 0 then %></font></b> <b>
<a target="_blank" href="labelprint.asp?ordno=<%= rs("ord_no") %>"><font size="1">Completed</font></a><font size="1">

<%End If%>
ASP

Avatar of undefined
Last Comment
kwitcom

8/22/2022 - Mon