D
DN
I have an Access database and am using Front Page with a little ASP and VB
script to manipulate and display data. I am having some problems with a page
that is displaying data properly but is not totaling points correctly by the
desired variable. It is also not providing total points for the last entry
on the page. I'm not sure this is the correct list to get help with this or
not. Here is the code from the page. I need it to total points by NWHAHP
even if there is a newshow or lastshow. I also need it to provide total
points for the last NWHAHP entry on the page. Thanks in advance for any
suggestions and assistance.......DN
<%@ LANGUAGE=VBScript %>
<%dim Lastshow, Newshow, LastNWHAHP, NewNWHAHP
Lastshow = " "
Newshow = " "
LastNWHAHP = " "
NewNWHAHP = " "
%>
<%dim Totalpoints
Totalpoints = 0.0
%>
Within this area is the Database Results info.
<!--webbot bot="DatabaseRegionStart" endspan -->
</font>
</font>
<% Newshow = FP_FieldVal(fp_rs,"Name")%>
<% NewNWHAHP = FP_FieldVal(fp_rs,"NWHAHP")%>
<%if ((NewNWHAHP <> LastNWHAHP) and (LastNWHAHP <> " ")) or ((Newshow <>
Lastshow) and (Lastshow <> " ")) then%>
<tr><td nowrap colspan="3"> </td><td nowrap colspan="2"><font face="Arial"
size="1" >Total Points</font></td><td nowrap ><font face="Arial" size="1" >
<%=Totalpoints%></font></td></tr>
<tr><td colspan="6"><hr width="100%"></td></tr>
<% Totalpoints = 0%>
<% end if %>
<td nowrap ><font face="Arial" size="1" color="#000080">
<% Totalpoints =Totalpoints + FP_FieldVal(fp_rs,"Points")%>
<%if ((NewNWHAHP <> LastNWHAHP) ) then%>
<!--webbotbot="DatabaseResultColumn" startspan
<%elseif Newshow <> Lastshow and ((NewNWHAHP = LastNWHAHP) or (LastNWHAHP =
" "))then%>
<%=FP_FieldVal(fp_rs,"Name")%>
<% end if %>
</td>
<% Lastshow = FP_FieldVal(fp_rs,"Name")%>
<% LastNWHAHP = FP_FieldVal(fp_rs,"NWHAHP")%>
<!--webbot bot="DatabaseRegionEnd" endspan -->
</tbody>
<tr><td nowrap colspan="3"> </td><td nowrap colspan="2"><font face="Arial"
size="1" >Total Points</font></td><td nowrap ><font face="Arial" size="1" >
<%=Totalpoints%></font></td></tr>
script to manipulate and display data. I am having some problems with a page
that is displaying data properly but is not totaling points correctly by the
desired variable. It is also not providing total points for the last entry
on the page. I'm not sure this is the correct list to get help with this or
not. Here is the code from the page. I need it to total points by NWHAHP
even if there is a newshow or lastshow. I also need it to provide total
points for the last NWHAHP entry on the page. Thanks in advance for any
suggestions and assistance.......DN
<%@ LANGUAGE=VBScript %>
<%dim Lastshow, Newshow, LastNWHAHP, NewNWHAHP
Lastshow = " "
Newshow = " "
LastNWHAHP = " "
NewNWHAHP = " "
%>
<%dim Totalpoints
Totalpoints = 0.0
%>
Within this area is the Database Results info.
<!--webbot bot="DatabaseRegionStart" endspan -->
</font>
</font>
<% Newshow = FP_FieldVal(fp_rs,"Name")%>
<% NewNWHAHP = FP_FieldVal(fp_rs,"NWHAHP")%>
<%if ((NewNWHAHP <> LastNWHAHP) and (LastNWHAHP <> " ")) or ((Newshow <>
Lastshow) and (Lastshow <> " ")) then%>
<tr><td nowrap colspan="3"> </td><td nowrap colspan="2"><font face="Arial"
size="1" >Total Points</font></td><td nowrap ><font face="Arial" size="1" >
<%=Totalpoints%></font></td></tr>
<tr><td colspan="6"><hr width="100%"></td></tr>
<% Totalpoints = 0%>
<% end if %>
<td nowrap ><font face="Arial" size="1" color="#000080">
<% Totalpoints =Totalpoints + FP_FieldVal(fp_rs,"Points")%>
<%if ((NewNWHAHP <> LastNWHAHP) ) then%>
<!--webbotbot="DatabaseResultColumn" startspan
<%elseif Newshow <> Lastshow and ((NewNWHAHP = LastNWHAHP) or (LastNWHAHP =
" "))then%>
<%=FP_FieldVal(fp_rs,"Name")%>
<% end if %>
</td>
<% Lastshow = FP_FieldVal(fp_rs,"Name")%>
<% LastNWHAHP = FP_FieldVal(fp_rs,"NWHAHP")%>
<!--webbot bot="DatabaseRegionEnd" endspan -->
</tbody>
<tr><td nowrap colspan="3"> </td><td nowrap colspan="2"><font face="Arial"
size="1" >Total Points</font></td><td nowrap ><font face="Arial" size="1" >
<%=Totalpoints%></font></td></tr>