O
oldmankirby
I have a problem I really can't figure out what I am doing wrong. I
have the following code:
stnum = "0"
inull = "SAM1"
aname = "a"
bname="a"
while Not rs.EOF
if (stnum <> rs("sn") and aname <> rs("fname") and bname <>
rs("lname") and inull = rs("idModule")) then
response.write ("<tr><td>Store #</td><td> </td><td> </
td><td> </td><td> </td><td> </td></tr>")
response.write ("<tr><td><strong>" & rs("sn") & "</strong></
td><td> </td><td> </td><td> </td><td> </td></tr>")
response.write ("<tr><td> </td><td>Employee ID</td><td> </
td><td>Name</td><td>Position</td><td>Hire Date</td></tr>")
response.write ("<tr><td> </td><td><font color = ""blue"">" &
rs("empid") & "</font></td><td>" & rs("idModule") & "</td><td>" &
rs("fname") & " " & rs("lname") & "</td><td>" & rs("description") & "</
td><td>" & rs("hiredate") & "</td><td> </td></font></tr>")
elseif (stnum <> rs("sn") and aname <> rs("fname") and bname <>
rs("lname") and inull <> rs("idModule")) then
response.write ("<tr><td>Store #</td><td> </td><td> </
td><td> </td><td> </td><td> </td></tr>")
response.write ("<tr><td><strong>" & rs("sn") & "</strong></
td><td> </td><td> </td><td> </td><td> </td></tr>")
response.write ("<tr><td> </td><td>Employee ID</td><td> </
td><td>Name</td><td>Position</td><td>Hire Date</td></tr>")
response.write ("<tr><td> </td><td><font color =""red"">" &
rs("empid") & "</font></td><td>" & rs("idModule") & "</td><td>" &
rs("fname") & " " & rs("lname") & "</td><td>" & rs("description") & "</
td><td>" & rs("hiredate") & "</td><td> </td></font></tr>")
else
response.write("<tr><td> </td><td> </td><td></td><td></td></
tr>")
response.write("<tr><td>" & rs("sn") & "</td><td> </
td><td> </td><td>" & rs("fname") & " " & rs("lname") & "</
td><td> </td><td>" & rs("empid") & "<td> </td><td>" &
rs("Description") & "</td><td> </td><td>" & rs("HireDate") & "</
td></tr>")
end if
stnum = rs("sn")
aname = rs("fname")
bname = rs("lname")
rs.MoveNext
Wend
Here a sample of what the outout looks like:
Store #
2
Employee ID Name
Position Hire Date
9999999 SAM1 Sean
Analyst 6/4/2007
Sean
3 33333333 SAM3 Bob
test 6/1/2007
All the data is coming from a MS SQL DB. So here is my issue if SAM1
= idmodule then emp id is supposed to be blue if iit does not then
the employee id should be red. No matter what, the empid is red.
Where am I going wrong?
have the following code:
stnum = "0"
inull = "SAM1"
aname = "a"
bname="a"
while Not rs.EOF
if (stnum <> rs("sn") and aname <> rs("fname") and bname <>
rs("lname") and inull = rs("idModule")) then
response.write ("<tr><td>Store #</td><td> </td><td> </
td><td> </td><td> </td><td> </td></tr>")
response.write ("<tr><td><strong>" & rs("sn") & "</strong></
td><td> </td><td> </td><td> </td><td> </td></tr>")
response.write ("<tr><td> </td><td>Employee ID</td><td> </
td><td>Name</td><td>Position</td><td>Hire Date</td></tr>")
response.write ("<tr><td> </td><td><font color = ""blue"">" &
rs("empid") & "</font></td><td>" & rs("idModule") & "</td><td>" &
rs("fname") & " " & rs("lname") & "</td><td>" & rs("description") & "</
td><td>" & rs("hiredate") & "</td><td> </td></font></tr>")
elseif (stnum <> rs("sn") and aname <> rs("fname") and bname <>
rs("lname") and inull <> rs("idModule")) then
response.write ("<tr><td>Store #</td><td> </td><td> </
td><td> </td><td> </td><td> </td></tr>")
response.write ("<tr><td><strong>" & rs("sn") & "</strong></
td><td> </td><td> </td><td> </td><td> </td></tr>")
response.write ("<tr><td> </td><td>Employee ID</td><td> </
td><td>Name</td><td>Position</td><td>Hire Date</td></tr>")
response.write ("<tr><td> </td><td><font color =""red"">" &
rs("empid") & "</font></td><td>" & rs("idModule") & "</td><td>" &
rs("fname") & " " & rs("lname") & "</td><td>" & rs("description") & "</
td><td>" & rs("hiredate") & "</td><td> </td></font></tr>")
else
response.write("<tr><td> </td><td> </td><td></td><td></td></
tr>")
response.write("<tr><td>" & rs("sn") & "</td><td> </
td><td> </td><td>" & rs("fname") & " " & rs("lname") & "</
td><td> </td><td>" & rs("empid") & "<td> </td><td>" &
rs("Description") & "</td><td> </td><td>" & rs("HireDate") & "</
td></tr>")
end if
stnum = rs("sn")
aname = rs("fname")
bname = rs("lname")
rs.MoveNext
Wend
Here a sample of what the outout looks like:
Store #
2
Employee ID Name
Position Hire Date
9999999 SAM1 Sean
Analyst 6/4/2007
Sean
3 33333333 SAM3 Bob
test 6/1/2007
All the data is coming from a MS SQL DB. So here is my issue if SAM1
= idmodule then emp id is supposed to be blue if iit does not then
the employee id should be red. No matter what, the empid is red.
Where am I going wrong?