The following code used an array to display the items ordered. The problem is, it only displays the last entry in the array. Please Help Me!!!!
'**************************************
Sub ShowOrder
Dim i 'as Integer
Dim sTotal
Dim sExtension
Dim sShipCharge
sShipCharge = 15.00
ID1 = Request("sID1"
ID2 = Request("sID2"
%>
<body vlink="#0000FF" alink="#0000FF">
<table border="1" cellpadding="2" style="border-left-color: #0000FF; border-top-color: #0000FF" width="100%" bordercolorlight="#FF0000" bordercolordark="#0000FF">
<tr>
<td bgcolor="#C0C0C0" width="60">
<b>
<font face="Arial"><font size="2">Part#</font>
</b>
</td>
<td bgcolor="#C0C0C0" width="75">
<b>
<font size="2" face="Arial">Item</font>
</b>
</td>
<td bgcolor="#C0C0C0" width="299">
<b>
<font size="2" face="Arial">Description</font>
</b>
</td>
<td bgcolor="#C0C0C0" width="3">
<b>
<font size="2" face="Arial">Quantity Ordered</font>
</b>
</td>
<td bgcolor="#C0C0C0" width="7">
<b>
<font size="2" face="Arial">Price</font>
</b>
</td>
</tr>
<%
stotal = 0
for i=0 to iCount
'if aPartNumber(i) <> "" then
sExtension = aQtyOrder(i) * aPrice(i)
sTotal = sTotal + sExtension
%>
<tr>
<td width="60"><font size="2"><%=aPartNumber(i)%> </font></td>
<td width="75"><font size="2"><%=aItem(i)%> </font></td>
<td width="299"><font size="2"><%=aDescription(i)%> </font></td>
<td width="3" align="Right"><font size="2"><%=aQtyOrder(i)%></font></td>
<td width="7"><font size="2"><%=FormatCurrency(aPrice(i))%> </font></td>
</tr>
<%
Next 'i
iCount=iCount + 1
sTotal = sTotal + sShipCharge
%>
<tr>
<td width="60"></td>
<td width="75"></td>
<td width="299"></td>
<td width="3"><font color="#000080">Delivery Charge:</font></td>
<td width="7"> <font size="2"><%=FormatCurrency(sShipCharge)%> </font></td>
</tr>
<tr>
<td width="60"><a href="Order.asp?action=ShowCatelog&Count=<%=iCount%>&sID1=<%=ID1%>&sID2=<%=ID2%>">Previous</a></td>
<td width="75"><a href="Order.asp?action=Nothing&Count=<%=iCount%>">Item Search</a></td>
<td width="299"></td>
<td width="3"><font color="#000080">Total:</font></td>
<td width="7"> <font size="2"><%=FormatCurrency(sTotal)%> </font></td>
</tr>
<form name="ShowOrder">
<input type="hidden" name="sID1" value=<%=ID1%>>
<input type="hidden" name="sID2" value=<%=ID2%>>
</form>
<%
Public aPartNumber() 'as Array
Public aQtyOrder() 'as Array
Public aPrice() 'as Array
Public aItem() 'as Array
Public aDescription() 'as Array
Dim sAction 'as String
Dim iCount 'as Integer
Dim PartNumber 'as String
Dim Item 'as String
Dim Description 'as String
Dim Price 'as Integer
Dim Quantity 'as Integer
Dim ID1
Dim ID2
Dim OrderNumber 'as Integer
sAction = Request("action"
PartNumber = Request("txtPart"
Item = Request("txtItem"
Description = Request("txtDescription"
Price = Request("txtPrice"
Quantity = Request("txtQty"
iCount = CInt(Request.QueryString("Count")
ID1 = Request("sID1"
ID2 = Request("sID2"
Select Case sAction
Case "add"
ReDim Preserve aPartNumber(iCount)
aPartNumber(iCount) = PartNumber
ReDim Preserve aItem(iCount)
aItem(iCount) = Item
ReDim Preserve aDescription(iCount)
aDescription(iCount) = Description
ReDim Preserve aPrice(iCount)
aPrice(iCount) = Price
ReDim Preserve aQtyOrder(iCount)
aQtyOrder(iCount) = Quantity
AddItem PartNumber, Item, Description, Price, Quantity, iCount
'iCount = iCount + 1
ShowOrder
Case "del"
DelItem PartNumber, iCount
ShowOrder
Case "ShowOrder"
ShowOrder iCount
Case "CheckOut"
PlaceOrder
Case "ShowCatelog"
ShowCatelog ID1, ID2
Case Else 'Item Search
ItemSearch
End Select
%>
End Sub
'**************************************
Sub ShowOrder
Dim i 'as Integer
Dim sTotal
Dim sExtension
Dim sShipCharge
sShipCharge = 15.00
ID1 = Request("sID1"
ID2 = Request("sID2"
%>
<body vlink="#0000FF" alink="#0000FF">
<table border="1" cellpadding="2" style="border-left-color: #0000FF; border-top-color: #0000FF" width="100%" bordercolorlight="#FF0000" bordercolordark="#0000FF">
<tr>
<td bgcolor="#C0C0C0" width="60">
<b>
<font face="Arial"><font size="2">Part#</font>
</b>
</td>
<td bgcolor="#C0C0C0" width="75">
<b>
<font size="2" face="Arial">Item</font>
</b>
</td>
<td bgcolor="#C0C0C0" width="299">
<b>
<font size="2" face="Arial">Description</font>
</b>
</td>
<td bgcolor="#C0C0C0" width="3">
<b>
<font size="2" face="Arial">Quantity Ordered</font>
</b>
</td>
<td bgcolor="#C0C0C0" width="7">
<b>
<font size="2" face="Arial">Price</font>
</b>
</td>
</tr>
<%
stotal = 0
for i=0 to iCount
'if aPartNumber(i) <> "" then
sExtension = aQtyOrder(i) * aPrice(i)
sTotal = sTotal + sExtension
%>
<tr>
<td width="60"><font size="2"><%=aPartNumber(i)%> </font></td>
<td width="75"><font size="2"><%=aItem(i)%> </font></td>
<td width="299"><font size="2"><%=aDescription(i)%> </font></td>
<td width="3" align="Right"><font size="2"><%=aQtyOrder(i)%></font></td>
<td width="7"><font size="2"><%=FormatCurrency(aPrice(i))%> </font></td>
</tr>
<%
Next 'i
iCount=iCount + 1
sTotal = sTotal + sShipCharge
%>
<tr>
<td width="60"></td>
<td width="75"></td>
<td width="299"></td>
<td width="3"><font color="#000080">Delivery Charge:</font></td>
<td width="7"> <font size="2"><%=FormatCurrency(sShipCharge)%> </font></td>
</tr>
<tr>
<td width="60"><a href="Order.asp?action=ShowCatelog&Count=<%=iCount%>&sID1=<%=ID1%>&sID2=<%=ID2%>">Previous</a></td>
<td width="75"><a href="Order.asp?action=Nothing&Count=<%=iCount%>">Item Search</a></td>
<td width="299"></td>
<td width="3"><font color="#000080">Total:</font></td>
<td width="7"> <font size="2"><%=FormatCurrency(sTotal)%> </font></td>
</tr>
<form name="ShowOrder">
<input type="hidden" name="sID1" value=<%=ID1%>>
<input type="hidden" name="sID2" value=<%=ID2%>>
</form>
<%
Public aPartNumber() 'as Array
Public aQtyOrder() 'as Array
Public aPrice() 'as Array
Public aItem() 'as Array
Public aDescription() 'as Array
Dim sAction 'as String
Dim iCount 'as Integer
Dim PartNumber 'as String
Dim Item 'as String
Dim Description 'as String
Dim Price 'as Integer
Dim Quantity 'as Integer
Dim ID1
Dim ID2
Dim OrderNumber 'as Integer
sAction = Request("action"
PartNumber = Request("txtPart"
Item = Request("txtItem"
Description = Request("txtDescription"
Price = Request("txtPrice"
Quantity = Request("txtQty"
iCount = CInt(Request.QueryString("Count")
ID1 = Request("sID1"
ID2 = Request("sID2"
Select Case sAction
Case "add"
ReDim Preserve aPartNumber(iCount)
aPartNumber(iCount) = PartNumber
ReDim Preserve aItem(iCount)
aItem(iCount) = Item
ReDim Preserve aDescription(iCount)
aDescription(iCount) = Description
ReDim Preserve aPrice(iCount)
aPrice(iCount) = Price
ReDim Preserve aQtyOrder(iCount)
aQtyOrder(iCount) = Quantity
AddItem PartNumber, Item, Description, Price, Quantity, iCount
'iCount = iCount + 1
ShowOrder
Case "del"
DelItem PartNumber, iCount
ShowOrder
Case "ShowOrder"
ShowOrder iCount
Case "CheckOut"
PlaceOrder
Case "ShowCatelog"
ShowCatelog ID1, ID2
Case Else 'Item Search
ItemSearch
End Select
%>
End Sub