|
Show list of all orders placed by this
customer on Orders Edit
page (sample Northwind database in MS Access).
Use (Insert ASP code snippet) button to
add this event on the Visual
Editor page.
Note: Change the values listed in
red to match your specific needs.
|
Sub
EditOnLoad()
set
rstmp
= dal.orders.Query(strWhereClause,"")
CustomerID = rstmp(0)
rstmp.Close
:
set
rstmp
= nothing
response.write
"Orders placed by " &
customerid &
"<br>"
set
rsOrders
= dal.orders.Query("where
customerid='" &
customerid &
"'","")
do
while not rsOrders.eof
response.write
"<a target=_blank href=Orders_edit.asp?editid="
&_
rsOrders("OrderID")
&
">"
& rsOrders("OrderID")
&
"</a> "
& rsOrders("OrderDate")
&
"<br>"
rsOrders.MoveNext
loop
rsOrders.Close
:
set
rsOrders
= nothing
End
Sub
|
|