I have a form that gets the last updated record from the database and allows the user to update the record. Here is the form:
<html>
<%
myDSN ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("../../fpdb/sms.mdb")
FUNCTION dropDownMenu(tableName,dbFieldName,formFieldName,sortBy,selectItem)
ddSQL = "SELECT " & dbFieldName & " FROM " & tableName & " ORDER BY " & dbFieldName & " ASC"
set conntemp=server.createobject("adodb.connection")
conntemp.open myDSN
set rstemp=conntemp.execute(ddSQL)
IF rstemp.eof THEN
response.write "No records matched so cannot make menu."
Call CloseAll
ELSE
menuArray=rstemp.getrows
Call CloseAll
Response.write("<select size='1' name='" & formFieldName & "'>" & VbCrLf)
FOR m = 0 TO ubound(menuArray,2)
Response.write("<option")
IF menuArray(0,m) = selectItem THEN
Response.write(" selected")
END IF
Response.write(">" & menuArray(0,m) & "</option>" & VbCrLf)
NEXT
Response.write("</select>" & VbCrLf)
END IF
END FUNCTION
SUB CloseAll
'rstemp.close
'set rstemp=nothing
'conntemp.close
'set conntemp=nothing
END SUB
%>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Shipment Management System</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<style href>a {text-decoration: none} </style>
<link rel="stylesheet" type="text/css" href="../../sms_bin/includes/sms_style.css">
<style fprolloverstyle>A:hover {color: #800000}
</style>
</head>
<body bgcolor="#CFDBE7" topmargin="0" leftmargin="0" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" style="text-align: center">
<div align="center">
<div align="center">
<table border="0" width="740" id="table9" cellpadding="0" height="54" background="../../images/Header.gif" style="border-collapse: collapse" bordercolor="#638AB0">
<tr>
<td valign="top" style="border-left-style: solid; border-left-width: 1px; border-top-style: solid; border-top-width: 1px; border-bottom-width: 1px" width="446"> </td>
<td valign="top" style="border-right-style: solid; border-right-width: 1px; border-top-style: solid; border-top-width: 1px; border-bottom-width: 1px">
<table border="0" width="100%" id="table10" cellspacing="0" cellpadding="0">
<tr>
<td valign="bottom">
<p align="center">
<img border="0" src="../../images/entcentertext.gif" width="201" height="15"></td>
</tr>
</table>
<table border="0" width="100%" id="table11" cellspacing="0" cellpadding="0">
<tr>
<td>
<p align="center">
<img border="0" src="../../images/headerline.gif" width="240" height="7"></td>
</tr>
</table>
<table border="0" width="100%" id="table12" cellspacing="0" cellpadding="0" height="30" style="color: #800000">
<tr>
<td>
<div align="center">
<!-- #include file="../../sms_bin/includes/menu_title_header.htm" --></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<table border="0" width="740" id="table13" cellpadding="0" style="border-collapse: collapse" bordercolor="#638AB0" height="25">
<tr>
<td style="border-left-style: solid; border-left-width: 1px; border-top-width: 1px; " width="160" bgcolor="#638AB0">
<p align="center"><b><font color="#FFFFFF" size="2" face="Arial">
<a href="../../contractor/default.asp">Main </a></font></b>
<a href="../../contractor/default.asp"><b><font face="Arial" size="2">Page</font></b></a></td>
<td style="border-right-style: solid; border-right-width: 1px; border-top-width: 1px; " bgcolor="#EDEDE1" valign="bottom">
<p align="center">
<iframe name="menu_top_admin" src="../menu_top_enterprise.htm" marginwidth="1" marginheight="1" scrolling="no" border="0" frameborder="0" width="555" height="20" target="_top">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe></p>
</td>
</tr>
</table>
<table border="0" width="740" id="table2" cellpadding="0" bgcolor="#FFFFFF" style="border-collapse: collapse" bordercolor="#638AB0">
<tr>
<td valign="top" style="border-style:solid; border-width:1px; " width="159" bgcolor="#EDEDE1">
<table border="0" width="100%" id="table14" cellpadding="0" height="30" style="border-collapse: collapse" bordercolor="#638AB0">
<tr>
<td style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px" bgcolor="#EAEFF4">
<p align="center"><b>
<font face="Arial" size="2" color="#878750">Shipment Manager</font></b></td>
</tr>
</table>
<p>
<iframe name="I1" src="menu_left_shipment_ent.asp" marginwidth="1" marginheight="1" scrolling="no" border="0" frameborder="0" width="149" height="300" target="_top">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>
<p> </td>
<td valign="top" style="border-style:solid; border-width:1px; ">
<table border="0" width="100%" id="table15" cellspacing="0" cellpadding="8">
<tr>
<td valign="top" width="50%">
<p align="center">
<font size="4" face="Arial" color="#878750">Latest Shipment
Added</font></p>
<!--#include file="../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM Query_Shipment WHERE ModifiedDate = (SELECT Max(ModifiedDate) FROM Query_Shipment);"
fp_sDefault=""
fp_sNoRecords="No records returned."
fp_sDataConn="sms"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&IDShpmt=3&EnterDate=135&ModifiedDate=202&OLastName=202&OFirstName=202&OPostfix=202&OPrefix=202&OAddress1=202&OAddress2=202&OCity=202&OState=202&OCounty=202&OZip=202&OTelephone1=202&OExt1=202&OTelephone2=202&OExt2=202&OCellPhone=202&OFax1=202&OEmail=202&DLastName=202&DFirstName=202&DPostfix=202&DPrefix=202&DAddress1=202&DAddress2=202&DCity=202&DState=202&DCounty=202&DZip=202&DTelephone1=202&DExt1=202&DTelephone2=202&DExt2=202&DCellPhone=202&DFax1=202&DEmail=202&GeneralInstructions=203&OriginInstructions=203&DestInstructions=203&BillTo=202&SalesRep=202&Contractor=202&DeliveryPrice=3&PickUpPrice=3&OriginFlightsQty=202&OriginFlightsPrice=3&DeliveryFlightsQty=202&DeliveryFlightsPrice=3&AdtlMilesQty=202&AdtlMilesPrice=3&Accessorial01=202&AccessorialPrice01=3&Accessorial02=202&AccessorialPrice02=3&Accessorial03=202&AccessorialPrice03=3&Accessorial04=202&AccessorialPrice04=3&Accessorial05=202&AccessorialPrice05=3&Accessorial06=202&AccessorialPrice06=3&Accessorial07=202&AccessorialPrice07=3&Total=3&"
fp_iDisplayCols=66
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../_fpclass/fpdbrgn1.inc"-->
<form METHOD="POST" action="main_shipment_ent_update_processor.asp">
<table border="1" width="100%" id="table146" cellspacing="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#878750">
<tr>
<td bgcolor="#EDEDE1" width="33%">
<p align="center"><b>
<font face="Arial" size="2" color="#547BA2">
Shipment ID</font></b></td>
<td bgcolor="#EDEDE1" width="33%">
<p align="center"><b>
<font face="Arial" size="2" color="#547BA2">
Entry Date</font></b></td>
<td bgcolor="#EDEDE1" width="33%">
<p align="center"><b>
<font face="Arial" size="2" color="#547BA2">Last
Modified Date</font></b></td>
</tr>
<tr>
<td width="33%">
<p align="center"><font size="2" face="Arial">
<%=FP_FieldVal(fp_rs,"IDShpmt")%></font></td>
<td width="33%">
<p align="center"><font size="2" face="Arial">
<%=FP_FieldVal(fp_rs,"EnterDate")%></font></td>
<td width="33%">
<p align="center"><font size="2" face="Arial">
<%=FP_FieldVal(fp_rs,"ModifiedDate")%></font></td>
</tr>
</table>
<table border="0" width="100%" id="table147" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table border="1" width="100%" id="table128" cellpadding="0" style="border-collapse: collapse" bordercolor="#878750">
<tr>
<td width="50%">
<table border="0" width="100%" id="table129" cellpadding="3" bgcolor="#EDEDE1" style="border-collapse: collapse" bordercolor="#878750">
<tr>
<td style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px">
<p align="center">
<font face="Arial" size="4" color="#547BA2">
Shipper</font></td>
</tr>
</table>
<table border="0" width="100%" id="table130" cellspacing="0" cellpadding="0">
<tr>
<td>
<p align="center"> </td>
</tr>
</table>
<table border="0" width="100%" id="table131" cellspacing="0" cellpadding="3">
<tr>
<td align="right"><b>
<font face="Arial" size="2">Honorific:</font></b></td>
<td><%call dropDownMenu("Dropdown_Honorific","DisplayValue","OPrefix","OptionName",FP_FieldVal(fp_rs,"OPrefix"))%></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">First Name:</font></b></td>
<td>
<input TYPE="TEXT" NAME="OFirstName" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"OFirstName")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Last Name:</font></b></td>
<td>
<input TYPE="TEXT" NAME="OLastName" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"OLastName")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Address1:</font></b></td>
<td>
<input TYPE="TEXT" NAME="OAddress1" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"OAddress1")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Address2:</font></b></td>
<td>
<input TYPE="TEXT" NAME="OAddress2" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"OAddress2")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">City:</font></b></td>
<td>
<input TYPE="TEXT" NAME="OCity" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"OCity")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">State:</font></b></td>
<td><%call dropDownMenu("Dropdown_State","DisplayValue","OState","OptionName",FP_FieldVal(fp_rs,"OState"))%></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">County:</font></b></td>
<td>
<input TYPE="TEXT" NAME="OCounty" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"OCounty")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Zip:</font></b></td>
<td>
<input NAME="OZip" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"OZip")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Telephone:</font></b></td>
<td>
<input NAME="OTelephone1" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"OTelephone1")%>">
<b><font face="Arial" size="2">Ext:
</font></b>
<input NAME="OExt1" SIZE="5" VALUE="<%=FP_FieldHTML(fp_rs,"OExt1")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Telephone</font></b></td>
<td>
<input NAME="OTelephone2" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"OTelephone2")%>">
<b><font face="Arial" size="2">Ext:
</font></b>
<input NAME="OExt2" SIZE="5" VALUE="<%=FP_FieldHTML(fp_rs,"OExt2")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Cell Phone:</font></b></td>
<td>
<input NAME="OCellPhone" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"OCellPhone")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Fax:</font></b></td>
<td>
<input NAME="OFax1" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"OFax1")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Email:</font></b></td>
<td>
<input NAME="OEmail" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"OEmail")%>"></td>
</tr>
</table>
<table border="0" width="100%" id="table132" cellspacing="0" cellpadding="0">
<tr>
<td>
<p align="center"> </td>
</tr>
</table>
</td>
<td width="50%">
<table border="0" width="100%" id="table133" cellpadding="3" bgcolor="#EDEDE1" style="border-collapse: collapse" bordercolor="#878750">
<tr>
<td style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px">
<p align="center">
<font face="Arial" size="4" color="#547BA2">
Consignee</font></td>
</tr>
</table>
<table border="0" width="100%" id="table134" cellspacing="0" cellpadding="0">
<tr>
<td>
<p align="center"> </td>
</tr>
</table>
<table border="0" width="100%" id="table135" cellspacing="0" cellpadding="3">
<tr>
<td align="right"><b>
<font face="Arial" size="2">Honorific:</font></b></td>
<td><%call dropDownMenu("Dropdown_Honorific","DisplayValue","DPrefix","OptionName",FP_FieldVal(fp_rs,"DPrefix"))%></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">First Name:</font></b></td>
<td>
<input TYPE="TEXT" NAME="DFirstName" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"DFirstName")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Last Name:</font></b></td>
<td>
<input TYPE="TEXT" NAME="DLastName" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"DLastName")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Address1:</font></b></td>
<td>
<input TYPE="TEXT" NAME="DAddress1" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"DAddress1")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Address2:</font></b></td>
<td>
<input TYPE="TEXT" NAME="DAddress2" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"DAddress2")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">City:</font></b></td>
<td>
<input TYPE="TEXT" NAME="DCity" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"DCity")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">State:</font></b></td>
<td><%call dropDownMenu("Dropdown_State","DisplayValue","DState","OptionName",FP_FieldVal(fp_rs,"DState"))%></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">County:</font></b></td>
<td>
<input TYPE="TEXT" NAME="DCounty" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"DCounty")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Zip:</font></b></td>
<td>
<input TYPE="TEXT" NAME="DZip" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"DZip")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Telephone:</font></b></td>
<td>
<input NAME="DTelephone1" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"DTelephone1")%>"> <b><font face="Arial" size="2">Ext:
</font></b>
<input NAME="DExt1" SIZE="5" VALUE="<%=FP_FieldHTML(fp_rs,"DExt1")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Telephone</font></b></td>
<td>
<input NAME="DTelephone2" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"DTelephone2")%>"> <b><font face="Arial" size="2">Ext:
</font></b>
<input NAME="DExt2" SIZE="5" VALUE="<%=FP_FieldHTML(fp_rs,"DExt2")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Cell Phone:</font></b></td>
<td>
<input NAME="DCellPhone" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"DCellPhone")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Fax:</font></b></td>
<td>
<input NAME="DFax1" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"DFax1")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Email:</font></b></td>
<td>
<input TYPE="TEXT" NAME="DEmail" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"DEmail")%>"></td>
</tr>
</table>
<table border="0" width="100%" id="table136" cellspacing="0" cellpadding="0">
<tr>
<td>
<p align="center"> </td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" width="100%" id="table137" cellspacing="0" cellpadding="0">
<tr>
<td><hr color="#878750" width="80%" size="1">
</td>
</tr>
</table>
<table border="0" width="100%" id="table138" cellspacing="0" cellpadding="5">
<tr>
<td width="162" align="right"><b>
<font face="Arial" size="2">Sales
Representative:</font></b></td>
<td width="380"><%call dropDownMenu("Dropdown_Sales","FullName","SalesRep","FullName",FP_FieldVal(fp_rs,"SalesRep"))%></td>
</tr>
<tr>
<td width="162" align="right"><b>
<font face="Arial" size="2">Contractor:</font></b></td>
<td width="380"><%call dropDownMenu("Dropdown_Contractor","FullName","Contractor","FullName",FP_FieldVal(fp_rs,"Contractor"))%></td>
</tr>
<tr>
<td width="162" align="right"><b>
<font face="Arial" size="2">Bill To:</font></b></td>
<td width="380">
<nobr>
<select NAME="BillTo" SIZE="1">
<option value="<%=FP_FieldHTML(fp_rs,"BillTo")%>"><%=FP_FieldHTML(fp_rs,"BillTo")%>
</option>
<option>Shipper</option>
<option>Consignee</option>
</select></nobr></td>
</tr>
</table>
<table border="0" width="100%" id="table139" cellspacing="0" cellpadding="0">
<tr>
<td><hr color="#878750" width="80%" size="1">
</td>
</tr>
</table>
<table border="0" width="100%" id="table140" cellspacing="0" cellpadding="5">
<tr>
<td>
<p align="center"><b>
<font size="2" face="Arial">Shipment Description
and Instructions</font></b></td>
</tr>
<tr>
<td>
<p align="center">
<textarea rows="8" name="GeneralInstructions" cols="66"><%=FP_FieldHTML(fp_rs,"GeneralInstructions")%></textarea></td>
</tr>
</table>
<table border="0" width="100%" id="table141" cellspacing="0" cellpadding="0">
<tr>
<td><hr color="#878750" width="80%" size="1">
</td>
</tr>
</table>
<table border="0" width="100%" id="table142" cellspacing="0" cellpadding="5">
<tr>
<td align="center"><b>
<font size="2" face="Arial">Origin Special
Instructions</font></b></td>
<td align="center"><b>
<font size="2" face="Arial">Destination Special
Instructions</font></b></td>
</tr>
</table>
<table border="0" width="100%" id="table143" cellspacing="0" cellpadding="5">
<tr>
<td>
<p align="center">
<textarea rows="8" name="OriginInstructions" cols="31"><%=FP_FieldHTML(fp_rs,"OriginInstructions")%></textarea></td>
<td>
<p align="center">
<textarea rows="8" name="DestInstructions" cols="31"><%=FP_FieldHTML(fp_rs,"DestInstructions")%></textarea></td>
</tr>
</table>
<table border="0" width="100%" id="table144" cellspacing="0" cellpadding="0">
<tr>
<td><hr color="#878750" width="80%" size="1">
</td>
</tr>
</table>
<table border="0" width="100%" id="table145" cellpadding="5" style="border-collapse: collapse" bordercolor="#878750">
<tr>
<td width="90" align="right" style="border-left-style: solid; border-left-width: 1px; border-right-width: 1px; border-top-style: solid; border-top-width: 1px; border-bottom-width: 1px">
<b><font face="Arial" size="2">Delivery:</font></b></td>
<td width="200" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-style: solid; border-top-width: 1px; border-bottom-width: 1px">
<input NAME="DeliveryPrice" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"DeliveryPrice")%>"></td>
<td align="right" style="border-left-width: 1px; border-right-width: 1px; border-top-style: solid; border-top-width: 1px; border-bottom-width: 1px">
<%call dropDownMenu("Dropdown_Accessorial","DisplayValue","Accessorial01","OptionName",FP_FieldVal(fp_rs,"Accessorial01"))%><td width="85" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-style: solid; border-top-width: 1px; border-bottom-width: 1px">
<input TYPE="TEXT" NAME="AccessorialPrice01" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"AccessorialPrice01")%>"></td>
</tr>
<tr>
<td width="90" align="right" style="border-left-style: solid; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px">
<b><font face="Arial" size="2">Pick-Up:</font></b></td>
<td width="200" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px">
<input NAME="PickUpPrice" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"PickUpPrice")%>"></td>
<td align="right">
<%call dropDownMenu("Dropdown_Accessorial","DisplayValue","Accessorial02","OptionName",FP_FieldVal(fp_rs,"Accessorial02"))%></td>
<td width="85" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px">
<input TYPE="TEXT" NAME="AccessorialPrice02" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"AccessorialPrice02")%>"></td>
</tr>
<tr>
<td width="90" align="right" style="border-left-style: solid; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px">
<b><font face="Arial" size="2">Orig. Flights:</font></b></td>
<td width="200" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px">
<b><font face="Arial" style="font-size: 9pt">
Qty: </font>
</b>
<input NAME="OriginFlightsQty" SIZE="5" VALUE="<%=FP_FieldHTML(fp_rs,"OriginFlightsQty")%>">
<input NAME="OriginFlightsPrice" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"OriginFlightsPrice")%>"></td>
<td align="right">
<%call dropDownMenu("Dropdown_Accessorial","DisplayValue","Accessorial03","OptionName",FP_FieldVal(fp_rs,"Accessorial03"))%></td>
<td width="85" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px">
<input TYPE="TEXT" NAME="AccessorialPrice03" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"AccessorialPrice03")%>"></td>
</tr>
<tr>
<td width="90" align="right" style="border-left-style: solid; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px">
<b><font face="Arial" size="2">Del. Flights:</font></b></td>
<td width="200" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px">
<b><font face="Arial" style="font-size: 9pt">
Qty: </font>
</b>
<input NAME="DeliveryFlightsQty" SIZE="5" VALUE="<%=FP_FieldHTML(fp_rs,"DeliveryFlightsQty")%>">
<input NAME="DeliveryFlightsPrice" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"DeliveryFlightsPrice")%>"></td>
<td align="right">
<%call dropDownMenu("Dropdown_Accessorial","DisplayValue","Accessorial04","OptionName",FP_FieldVal(fp_rs,"Accessorial04"))%></td>
<td width="85" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px">
<input TYPE="TEXT" NAME="AccessorialPrice04" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"AccessorialPrice04")%>"></td>
</tr>
<tr>
<td width="90" align="right" style="border-left-style: solid; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px; border-bottom-style:solid">
<b><font face="Arial" size="2">Addl. Miles:</font></b></td>
<td width="200" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px; border-bottom-style:solid">
<b><font face="Arial" style="font-size: 9pt">
Qty: </font>
</b>
<input NAME="AdtlMilesQty" SIZE="5" VALUE="<%=FP_FieldHTML(fp_rs,"AdtlMilesQty")%>">
<input NAME="AdtlMilesPrice" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"AdtlMilesPrice")%>"></td>
<td align="right" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px">
<%call dropDownMenu("Dropdown_Accessorial","DisplayValue","Accessorial05","OptionName",FP_FieldVal(fp_rs,"Accessorial05"))%></td>
<td width="85" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px; border-bottom-style:solid">
<input TYPE="TEXT" NAME="AccessorialPrice05" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"AccessorialPrice05")%>"></td>
</tr>
</table>
<table border="1" width="100%" id="table148" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#878750">
<tr>
<td> </td>
<td width="97">
<p align="center">
<input TYPE="TEXT" NAME="Total" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"Total")%>"></td>
</tr>
</table>
<table border="0" width="100%" id="table149" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<div align="center">
<table BORDER="0" width="454">
<tr>
<td>
<p align="center">
<input TYPE="Submit" NAME="fp_submit"><input TYPE="Reset" NAME="fp_reset"></td>
</tr>
</table>
</div>
<input type="hidden" name="ModifiedDate" value="<%=now()%>">
<input type="hidden" name="IDShpmt" value="<%=FP_FieldHTML(fp_rs,"IDShpmt")%>">
</form>
<!--#include file="../../_fpclass/fpdbrgn2.inc"-->
<p>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p align="center"> </p>
<p align="center"> </div>
</body>
</html>
The form is submitted to my Update_Processor page. Here is the code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Shipment Management System</title>
<META HTTP-EQUIV="refresh" content="2;URL=main_shipment_ent_last_record.asp">
</head>
<body topmargin="0" leftmargin="0" bgcolor="#EAEFF4">
<div align="center">
<div align="center">
<table border="0" width="740" id="table42" cellpadding="0" height="54" background="../../images/Header.gif" style="border-collapse: collapse" bordercolor="#638AB0">
<tr>
<td valign="top" style="border-left-style: solid; border-left-width: 1px; border-top-style: solid; border-top-width: 1px; border-bottom-width: 1px" width="446"> </td>
<td valign="top" style="border-right-style: solid; border-right-width: 1px; border-top-style: solid; border-top-width: 1px; border-bottom-width: 1px">
</td>
</tr>
</table>
</div>
<table border="0" width="740" id="table43" cellpadding="0" style="border-collapse: collapse" bordercolor="#638AB0" height="25">
<tr>
<td style="border-left-style: solid; border-left-width: 1px; border-top-width: 1px; " width="160" bgcolor="#638AB0">
<p align="center"> </td>
<td style="border-right-style: solid; border-right-width: 1px; border-top-width: 1px; " bgcolor="#EDEDE1" valign="bottom">
<p align="center">
</p>
</td>
</tr>
</table>
<table border="0" width="740" id="table44" cellpadding="0" bgcolor="#FFFFFF" style="border-collapse: collapse" bordercolor="#638AB0" height="241">
<tr>
<td valign="top" style="border-style:solid; border-width:1px; " width="159" bgcolor="#EDEDE1">
<table border="0" width="100%" id="table45" cellpadding="0" height="30" style="border-collapse: collapse" bordercolor="#638AB0">
<tr>
<td style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px" bgcolor="#EAEFF4">
<p align="center"> </td>
</tr>
</table>
<p>
<p> </td>
<td valign="top" style="border-style:solid; border-width:1px; ">
<table border="0" width="100%" id="table46" cellspacing="0" cellpadding="8">
<tr>
<td valign="top">
<p align="center">
<font face="Arial" size="4" color="#878750">Contractor
Information Updating</font></p>
<div align="center">
<table border="0" width="100%" id="table47" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
<tr>
<td>
<div align="center">
<table border="0" width="100%" id="table48" cellspacing="0" cellpadding="5">
<tr>
<td>
<p align="center"><b>
<font face="Arial" size="2">Please wait while
your Contact Record is updated.</font></b></td>
</tr>
</table>
<table border="0" width="50%" id="table49" cellspacing="0" cellpadding="0">
<tr>
<td><script language="javascript" type="text/javascript">
var SIZE=240;
var STEP=2;
window.onload = progress;
function progress(){
var bar=document.getElementById("progressbar");
bar.style.width=(parseInt(bar.style.width)+STEP)%SIZE;
setTimeout("progress()",40);
}
</script>
<div id="progressbar" style="width:226px;height:10px;background-color:#BFCBE3">
</div>
</td>
</tr>
</table>
</div>
<p> </td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<p> </p>
<p> </p>
<table width="100%" border="0">
<thead>
</thead>
<tbody>
<!--#include file="../../_fpclassx/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="UPDATE Query_Shipment SET Accessorial01 = '::Accessorial01::', Accessorial02 = '::Accessorial02::', Accessorial03 = '::Accessorial03::', Accessorial04 = '::Accessorial04::', Accessorial05 = '::Accessorial05::', AccessorialPrice01 = '::AccessorialPrice01::', AccessorialPrice02 = '::AccessorialPrice02::', AccessorialPrice03 = '::AccessorialPrice03::', AccessorialPrice04 = '::AccessorialPrice04::', AccessorialPrice05 = '::AccessorialPrice05::', AdtlMilesPrice = '::AdtlMilesPrice::', AdtlMilesQty = '::AdtlMilesQty::', BillTo = '::BillTo::', DAddress1 = '::DAddress1::', DAddress2 = '::DAddress2::', DCellPhone = '::DCellPhone::', DCity = '::DCity::', DCounty = '::DCounty::', DeliveryFlightsPrice = '::DeliveryFlightsPrice::', DeliveryFlightsQty = '::DeliveryFlightsQty::', DeliveryPrice = '::DeliveryPrice::', DEmail = '::DEmail::', DestInstructions = '::DestInstructions::', DExt1 = '::DExt1::', DExt2 = '::DExt2::', DFax1 = '::DFax1::', DFirstName = '::DFirstName::', DLastName = '::DLastName::', DPrefix = '::DPrefix::', DState = '::DState::', DTelephone1 = '::DTelephone1::', DTelephone2 = '::DTelephone2::', DZip = '::DZip::', GeneralInstructions = '::GeneralInstructions::', OAddress1 = '::OAddress1::', OAddress2 = '::OAddress2::', OCellPhone = '::OCellPhone::', OCity = '::OCity::', OCounty = '::OCounty::', OEmail = '::OEmail::', OExt1 = '::OExt1::', OExt2 = '::OExt2::', OFax1 = '::OFax1::', OFirstName = '::OFirstName::', OLastName = '::OLastName::', OPrefix = '::OPrefix::', OriginFlightsPrice = '::OriginFlightsPrice::', OriginFlightsQty = '::OriginFlightsQty::', OriginInstructions = '::OriginInstructions::', OState = '::OState::', OTelephone1 = '::OTelephone1::', OTelephone2 = '::OTelephone2::', OZip = '::OZip::', PickUpPrice = '::PickUpPrice::', SalesRep = '::SalesRep::', ModifiedDate = '::ModifiedDate::' WHERE IDShpmt = ::IDShpmt:: "
fp_sDefault="Accessorial01=&Accessorial02=&Accessorial03=&Accessorial04=&Accessorial05=&AccessorialPrice01=&AccessorialPrice02=&AccessorialPrice03=&AccessorialPrice04=&AccessorialPrice05=&AdtlMilesPrice=&AdtlMilesQty=&BillTo=&DAddress1=&DAddress2=&DCellPhone=&DCity=&DCounty=&DeliveryFlightsPrice=&DeliveryFlightsQty=&DeliveryPrice=&DEmail=&DestInstructions=&DExt1=&DExt2=&DFax1=&DFirstName=&DLastName=&DPrefix=&DState=&DTelephone1=&DTelephone2=&DZip=&GeneralInstructions=&OAddress1=&OAddress2=&OCellPhone=&OCity=&OCounty=&OEmail=&OExt1=&OExt2=&OFax1=&OFirstName=&OLastName=&OPrefix=&OriginFlightsPrice=&OriginFlightsQty=&OriginInstructions=&OState=&OTelephone1=&OTelephone2=&OZip=&PickUpPrice=&SalesRep=&ModifiedDate=&IDShpmt="
fp_sNoRecords="<tr><td colspan=16 align=""LEFT"" width=""100%""></td></tr>"
fp_sDataConn="sms"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&DetailTotal=3&AccessorialPrice07=3&Accessorial07=202&AccessorialPrice06=3&Accessorial06=202&AccessorialPrice05=3&Accessorial05=202&AccessorialPrice04=3&Accessorial04=202&AccessorialPrice03=3&Accessorial03=202&AccessorialPrice02=3&Accessorial02=202&AccessorialPrice01=3&Accessorial01=202&AdtlMilesPrice=3&AdtlMilesQty=202&DeliveryFlightsPrice=3&DeliveryFlightsQty=202&OriginFlightsPrice=3&OriginFlightsQty=202&PickUpPrice=3&DeliveryPrice=3&Contractor=202&SalesRep=202&BillTo=202&DestInstructions=203&OriginInstructions=203&GeneralInstructions=203&DEmail=202&DFax1=202&DCellPhone=202&DExt2=202&DTelephone2=202&DExt1=202&DTelephone1=202&DZip=202&DCounty=202&DState=202&DCity=202&DAddress2=202&DAddress1=202&DPrefix=202&DPostfix=202&DFirstName=202&DLastName=202&OEmail=202&OFax1=202&OCellPhone=202&OExt2=202&OTelephone2=202&OExt1=202&OTelephone1=202&OZip=202&OCounty=202&OState=202&OCity=202&OAddress2=202&OAddress1=202&OPrefix=202&OPostfix=202&OFirstName=202&OLastName=202&ModifiedDate=135&EnterDate=135&IDShpmt=3&"
fp_iDisplayCols=16
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../_fpclassx/fpdbrgn1.inc"-->
<!--#include file="../../_fpclassx/fpdbrgn2.inc"-->
</tbody>
</table>
<p> </p>
<p> </p>
</body>
</html>
This works great.
However, I want to use the same form I use to get the last record but instead select a record based on and ID field call IDShpmt. I link to the form from a simple list of shipments and the page displays the corrected shipment based on the ID. This works great.
BUT
When is submit the form to the update processor I get this error:
Database Results Error
Description: The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data.
Number: -2147217833 (0x80040E57)
Source: Microsoft JET Database Engine
One or more form fields were empty. You should provide default values for all form fields that are used in the query.
Here is the update form:
<html>
<%
myDSN ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("../../fpdb/sms.mdb")
FUNCTION dropDownMenu(tableName,dbFieldName,formFieldName,sortBy,selectItem)
ddSQL = "SELECT " & dbFieldName & " FROM " & tableName & " ORDER BY " & dbFieldName & " ASC"
set conntemp=server.createobject("adodb.connection")
conntemp.open myDSN
set rstemp=conntemp.execute(ddSQL)
IF rstemp.eof THEN
response.write "No records matched so cannot make menu."
Call CloseAll
ELSE
menuArray=rstemp.getrows
Call CloseAll
Response.write("<select size='1' name='" & formFieldName & "'>" & VbCrLf)
FOR m = 0 TO ubound(menuArray,2)
Response.write("<option")
IF menuArray(0,m) = selectItem THEN
Response.write(" selected")
END IF
Response.write(">" & menuArray(0,m) & "</option>" & VbCrLf)
NEXT
Response.write("</select>" & VbCrLf)
END IF
END FUNCTION
SUB CloseAll
'rstemp.close
'set rstemp=nothing
'conntemp.close
'set conntemp=nothing
END SUB
%>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Shipment Management System</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<style href>a {text-decoration: none} </style>
<link rel="stylesheet" type="text/css" href="../../sms_bin/includes/sms_style.css">
<style fprolloverstyle>A:hover {color: #800000}
</style>
</head>
<body bgcolor="#CFDBE7" topmargin="0" leftmargin="0" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" style="text-align: center">
<div align="center">
<div align="center">
<table border="0" width="740" id="table9" cellpadding="0" height="54" background="../../images/Header.gif" style="border-collapse: collapse" bordercolor="#638AB0">
<tr>
<td valign="top" style="border-left-style: solid; border-left-width: 1px; border-top-style: solid; border-top-width: 1px; border-bottom-width: 1px" width="446"> </td>
<td valign="top" style="border-right-style: solid; border-right-width: 1px; border-top-style: solid; border-top-width: 1px; border-bottom-width: 1px">
<table border="0" width="100%" id="table10" cellspacing="0" cellpadding="0">
<tr>
<td valign="bottom">
<p align="center">
<img border="0" src="../../images/entcentertext.gif" width="201" height="15"></td>
</tr>
</table>
<table border="0" width="100%" id="table11" cellspacing="0" cellpadding="0">
<tr>
<td>
<p align="center">
<img border="0" src="../../images/headerline.gif" width="240" height="7"></td>
</tr>
</table>
<table border="0" width="100%" id="table12" cellspacing="0" cellpadding="0" height="30" style="color: #800000">
<tr>
<td>
<div align="center">
<!-- #include file="../../sms_bin/includes/menu_title_header.htm" --></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<table border="0" width="740" id="table13" cellpadding="0" style="border-collapse: collapse" bordercolor="#638AB0" height="25">
<tr>
<td style="border-left-style: solid; border-left-width: 1px; border-top-width: 1px; " width="160" bgcolor="#638AB0">
<p align="center"><b><font color="#FFFFFF" size="2" face="Arial">
<a href="../../contractor/default.asp">Main </a></font></b>
<a href="../../contractor/default.asp"><b><font face="Arial" size="2">Page</font></b></a></td>
<td style="border-right-style: solid; border-right-width: 1px; border-top-width: 1px; " bgcolor="#EDEDE1" valign="bottom">
<p align="center">
<iframe name="menu_top_admin" src="../menu_top_enterprise.htm" marginwidth="1" marginheight="1" scrolling="no" border="0" frameborder="0" width="555" height="20" target="_top">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe></p>
</td>
</tr>
</table>
<table border="0" width="740" id="table2" cellpadding="0" bgcolor="#FFFFFF" style="border-collapse: collapse" bordercolor="#638AB0">
<tr>
<td valign="top" style="border-style:solid; border-width:1px; " width="159" bgcolor="#EDEDE1">
<table border="0" width="100%" id="table14" cellpadding="0" height="30" style="border-collapse: collapse" bordercolor="#638AB0">
<tr>
<td style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px" bgcolor="#EAEFF4">
<p align="center"><b>
<font face="Arial" size="2" color="#878750">Shipment Manager</font></b></td>
</tr>
</table>
<p>
<iframe name="I1" src="menu_left_shipment_ent.asp" marginwidth="1" marginheight="1" scrolling="no" border="0" frameborder="0" width="149" height="300" target="_top">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>
<p> </td>
<td valign="top" style="border-style:solid; border-width:1px; ">
<table border="0" width="100%" id="table15" cellspacing="0" cellpadding="8">
<tr>
<td valign="top" width="50%">
<p align="center">
<font size="4" face="Arial" color="#878750">Latest Shipment
Added</font></p>
<!--#include file="../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM Query_Shipment WHERE (IDShpmt = ::IDShpmt::)"
fp_sDefault="IDShpmt="
fp_sNoRecords="No records returned."
fp_sDataConn="sms"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice="EnterDate"
fp_sMenuValue="EnterDate"
fp_sColTypes="&IDShpmt=3&EnterDate=135&ModifiedDate=135&OLastName=202&OFirstName=202&OPostfix=202&OPrefix=202&OAddress1=202&OAddress2=202&OCity=202&OState=202&OCounty=202&OZip=202&OTelephone1=202&OExt1=202&OTelephone2=202&OExt2=202&OCellPhone=202&OFax1=202&OEmail=202&DLastName=202&DFirstName=202&DPostfix=202&DPrefix=202&DAddress1=202&DAddress2=202&DCity=202&DState=202&DCounty=202&DZip=202&DTelephone1=202&DExt1=202&DTelephone2=202&DExt2=202&DCellPhone=202&DFax1=202&DEmail=202&GeneralInstructions=203&OriginInstructions=203&DestInstructions=203&BillTo=202&SalesRep=202&Contractor=202&DeliveryPrice=3&PickUpPrice=3&OriginFlightsQty=202&OriginFlightsPrice=3&DeliveryFlightsQty=202&DeliveryFlightsPrice=3&AdtlMilesQty=202&AdtlMilesPrice=3&Accessorial01=202&AccessorialPrice01=3&Accessorial02=202&AccessorialPrice02=3&Accessorial03=202&AccessorialPrice03=3&Accessorial04=202&AccessorialPrice04=3&Accessorial05=202&AccessorialPrice05=3&Accessorial06=202&AccessorialPrice06=3&Accessorial07=202&AccessorialPrice07=3&Total=3&"
fp_iDisplayCols=66
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../_fpclass/fpdbrgn1.inc"-->
<form METHOD="POST" action="main_shipment_ent_update_processor.asp">
<table border="1" width="100%" id="table146" cellspacing="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#878750">
<tr>
<td bgcolor="#EDEDE1" width="33%">
<p align="center"><b>
<font face="Arial" size="2" color="#547BA2">
Shipment ID</font></b></td>
<td bgcolor="#EDEDE1" width="33%">
<p align="center"><b>
<font face="Arial" size="2" color="#547BA2">
Entry Date</font></b></td>
<td bgcolor="#EDEDE1" width="33%">
<p align="center"><b>
<font face="Arial" size="2" color="#547BA2">Last
Modified Date</font></b></td>
</tr>
<tr>
<td width="33%">
</td>
<td width="33%">
<p align="center"><font size="2" face="Arial">
<%=FP_FieldVal(fp_rs,"EnterDate")%></font></td>
<td width="33%">
<p align="center"><font size="2" face="Arial">
<%=FP_FieldVal(fp_rs,"ModifiedDate")%></font></td>
</tr>
</table>
<table border="0" width="100%" id="table147" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table border="1" width="100%" id="table128" cellpadding="0" style="border-collapse: collapse" bordercolor="#878750">
<tr>
<td width="50%">
<table border="0" width="100%" id="table129" cellpadding="3" bgcolor="#EDEDE1" style="border-collapse: collapse" bordercolor="#878750">
<tr>
<td style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px">
<p align="center">
<font face="Arial" size="4" color="#547BA2">
Shipper</font></td>
</tr>
</table>
<table border="0" width="100%" id="table130" cellspacing="0" cellpadding="0">
<tr>
<td>
<p align="center"> </td>
</tr>
</table>
<table border="0" width="100%" id="table131" cellspacing="0" cellpadding="3">
<tr>
<td align="right"><b>
<font face="Arial" size="2">Honorific:</font></b></td>
<td><%call dropDownMenu("Dropdown_Honorific","DisplayValue","OPrefix","OptionName",FP_FieldVal(fp_rs,"OPrefix"))%></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">First Name:</font></b></td>
<td>
<input TYPE="TEXT" NAME="OFirstName" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"OFirstName")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Last Name:</font></b></td>
<td>
<input TYPE="TEXT" NAME="OLastName" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"OLastName")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Address1:</font></b></td>
<td>
<input TYPE="TEXT" NAME="OAddress1" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"OAddress1")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Address2:</font></b></td>
<td>
<input TYPE="TEXT" NAME="OAddress2" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"OAddress2")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">City:</font></b></td>
<td>
<input TYPE="TEXT" NAME="OCity" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"OCity")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">State:</font></b></td>
<td><%call dropDownMenu("Dropdown_State","DisplayValue","OState","OptionName",FP_FieldVal(fp_rs,"OState"))%></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">County:</font></b></td>
<td>
<input TYPE="TEXT" NAME="OCounty" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"OCounty")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Zip:</font></b></td>
<td>
<input NAME="OZip" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"OZip")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Telephone:</font></b></td>
<td>
<input NAME="OTelephone1" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"OTelephone1")%>">
<b><font face="Arial" size="2">Ext:
</font></b>
<input NAME="OExt1" SIZE="5" VALUE="<%=FP_FieldHTML(fp_rs,"OExt1")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Telephone</font></b></td>
<td>
<input NAME="OTelephone2" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"OTelephone2")%>">
<b><font face="Arial" size="2">Ext:
</font></b>
<input NAME="OExt2" SIZE="5" VALUE="<%=FP_FieldHTML(fp_rs,"OExt2")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Cell Phone:</font></b></td>
<td>
<input NAME="OCellPhone" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"OCellPhone")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Fax:</font></b></td>
<td>
<input NAME="OFax1" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"OFax1")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Email:</font></b></td>
<td>
<input NAME="OEmail" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"OEmail")%>"></td>
</tr>
</table>
<table border="0" width="100%" id="table132" cellspacing="0" cellpadding="0">
<tr>
<td>
<p align="center"> </td>
</tr>
</table>
</td>
<td width="50%">
<table border="0" width="100%" id="table133" cellpadding="3" bgcolor="#EDEDE1" style="border-collapse: collapse" bordercolor="#878750">
<tr>
<td style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px">
<p align="center">
<font face="Arial" size="4" color="#547BA2">
Consignee</font></td>
</tr>
</table>
<table border="0" width="100%" id="table134" cellspacing="0" cellpadding="0">
<tr>
<td>
<p align="center"> </td>
</tr>
</table>
<table border="0" width="100%" id="table135" cellspacing="0" cellpadding="3">
<tr>
<td align="right"><b>
<font face="Arial" size="2">Honorific:</font></b></td>
<td><%call dropDownMenu("Dropdown_Honorific","DisplayValue","DPrefix","OptionName",FP_FieldVal(fp_rs,"DPrefix"))%></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">First Name:</font></b></td>
<td>
<input TYPE="TEXT" NAME="DFirstName" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"DFirstName")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Last Name:</font></b></td>
<td>
<input TYPE="TEXT" NAME="DLastName" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"DLastName")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Address1:</font></b></td>
<td>
<input TYPE="TEXT" NAME="DAddress1" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"DAddress1")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Address2:</font></b></td>
<td>
<input TYPE="TEXT" NAME="DAddress2" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"DAddress2")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">City:</font></b></td>
<td>
<input TYPE="TEXT" NAME="DCity" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"DCity")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">State:</font></b></td>
<td><%call dropDownMenu("Dropdown_State","DisplayValue","DState","OptionName",FP_FieldVal(fp_rs,"DState"))%></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">County:</font></b></td>
<td>
<input TYPE="TEXT" NAME="DCounty" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"DCounty")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Zip:</font></b></td>
<td>
<input TYPE="TEXT" NAME="DZip" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"DZip")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Telephone:</font></b></td>
<td>
<input NAME="DTelephone1" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"DTelephone1")%>"> <b><font face="Arial" size="2">Ext:
</font></b>
<input NAME="DExt1" SIZE="5" VALUE="<%=FP_FieldHTML(fp_rs,"DExt1")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Telephone</font></b></td>
<td>
<input NAME="DTelephone2" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"DTelephone2")%>"> <b><font face="Arial" size="2">Ext:
</font></b>
<input NAME="DExt2" SIZE="5" VALUE="<%=FP_FieldHTML(fp_rs,"DExt2")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Cell Phone:</font></b></td>
<td>
<input NAME="DCellPhone" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"DCellPhone")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Fax:</font></b></td>
<td>
<input NAME="DFax1" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"DFax1")%>"></td>
</tr>
<tr>
<td align="right"><b>
<font face="Arial" size="2">Email:</font></b></td>
<td>
<input TYPE="TEXT" NAME="DEmail" SIZE="20" VALUE="<%=FP_FieldHTML(fp_rs,"DEmail")%>"></td>
</tr>
</table>
<table border="0" width="100%" id="table136" cellspacing="0" cellpadding="0">
<tr>
<td>
<p align="center"> </td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" width="100%" id="table137" cellspacing="0" cellpadding="0">
<tr>
<td><hr color="#878750" width="80%" size="1">
</td>
</tr>
</table>
<table border="0" width="100%" id="table138" cellspacing="0" cellpadding="5">
<tr>
<td width="162" align="right"><b>
<font face="Arial" size="2">Sales
Representative:</font></b></td>
<td width="380"><%call dropDownMenu("Dropdown_Sales","FullName","SalesRep","FullName",FP_FieldVal(fp_rs,"SalesRep"))%></td>
</tr>
<tr>
<td width="162" align="right"><b>
<font face="Arial" size="2">Contractor:</font></b></td>
<td width="380"><%call dropDownMenu("Dropdown_Contractor","FullName","Contractor","FullName",FP_FieldVal(fp_rs,"Contractor"))%></td>
</tr>
<tr>
<td width="162" align="right"><b>
<font face="Arial" size="2">Bill To:</font></b></td>
<td width="380">
<nobr>
<select NAME="BillTo" SIZE="1">
<option value="<%=FP_FieldHTML(fp_rs,"BillTo")%>"><%=FP_FieldHTML(fp_rs,"BillTo")%>
</option>
<option>Shipper</option>
<option>Consignee</option>
</select></nobr></td>
</tr>
</table>
<table border="0" width="100%" id="table139" cellspacing="0" cellpadding="0">
<tr>
<td><hr color="#878750" width="80%" size="1">
</td>
</tr>
</table>
<table border="0" width="100%" id="table140" cellspacing="0" cellpadding="5">
<tr>
<td>
<p align="center"><b>
<font size="2" face="Arial">Shipment Description
and Instructions</font></b></td>
</tr>
<tr>
<td>
<p align="center">
<textarea rows="8" name="GeneralInstructions" cols="66"><%=FP_FieldHTML(fp_rs,"GeneralInstructions")%></textarea></td>
</tr>
</table>
<table border="0" width="100%" id="table141" cellspacing="0" cellpadding="0">
<tr>
<td><hr color="#878750" width="80%" size="1">
</td>
</tr>
</table>
<table border="0" width="100%" id="table142" cellspacing="0" cellpadding="5">
<tr>
<td align="center"><b>
<font size="2" face="Arial">Origin Special
Instructions</font></b></td>
<td align="center"><b>
<font size="2" face="Arial">Destination Special
Instructions</font></b></td>
</tr>
</table>
<table border="0" width="100%" id="table143" cellspacing="0" cellpadding="5">
<tr>
<td>
<p align="center">
<textarea rows="8" name="OriginInstructions" cols="31"><%=FP_FieldHTML(fp_rs,"OriginInstructions")%></textarea></td>
<td>
<p align="center">
<textarea rows="8" name="DestInstructions" cols="31"><%=FP_FieldHTML(fp_rs,"DestInstructions")%></textarea></td>
</tr>
</table>
<table border="0" width="100%" id="table144" cellspacing="0" cellpadding="0">
<tr>
<td><hr color="#878750" width="80%" size="1">
</td>
</tr>
</table>
<table border="0" width="100%" id="table145" cellpadding="5" style="border-collapse: collapse" bordercolor="#878750">
<tr>
<td width="90" align="right" style="border-left-style: solid; border-left-width: 1px; border-right-width: 1px; border-top-style: solid; border-top-width: 1px; border-bottom-width: 1px">
<b><font face="Arial" size="2">Delivery:</font></b></td>
<td width="200" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-style: solid; border-top-width: 1px; border-bottom-width: 1px">
<input NAME="DeliveryPrice" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"DeliveryPrice")%>"></td>
<td align="right" style="border-left-width: 1px; border-right-width: 1px; border-top-style: solid; border-top-width: 1px; border-bottom-width: 1px">
<%call dropDownMenu("Dropdown_Accessorial","DisplayValue","Accessorial01","OptionName",FP_FieldVal(fp_rs,"Accessorial01"))%><td width="85" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-style: solid; border-top-width: 1px; border-bottom-width: 1px">
<input TYPE="TEXT" NAME="AccessorialPrice01" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"AccessorialPrice01")%>"></td>
</tr>
<tr>
<td width="90" align="right" style="border-left-style: solid; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px">
<b><font face="Arial" size="2">Pick-Up:</font></b></td>
<td width="200" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px">
<input NAME="PickUpPrice" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"PickUpPrice")%>"></td>
<td align="right">
<%call dropDownMenu("Dropdown_Accessorial","DisplayValue","Accessorial02","OptionName",FP_FieldVal(fp_rs,"Accessorial02"))%></td>
<td width="85" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px">
<input TYPE="TEXT" NAME="AccessorialPrice02" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"AccessorialPrice02")%>"></td>
</tr>
<tr>
<td width="90" align="right" style="border-left-style: solid; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px">
<b><font face="Arial" size="2">Orig. Flights:</font></b></td>
<td width="200" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px">
<b><font face="Arial" style="font-size: 9pt">
Qty: </font>
</b>
<input NAME="OriginFlightsQty" SIZE="5" VALUE="<%=FP_FieldHTML(fp_rs,"OriginFlightsQty")%>">
<input NAME="OriginFlightsPrice" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"OriginFlightsPrice")%>"></td>
<td align="right">
<%call dropDownMenu("Dropdown_Accessorial","DisplayValue","Accessorial03","OptionName",FP_FieldVal(fp_rs,"Accessorial03"))%></td>
<td width="85" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px">
<input TYPE="TEXT" NAME="AccessorialPrice03" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"AccessorialPrice03")%>"></td>
</tr>
<tr>
<td width="90" align="right" style="border-left-style: solid; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px">
<b><font face="Arial" size="2">Del. Flights:</font></b></td>
<td width="200" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px">
<b><font face="Arial" style="font-size: 9pt">
Qty: </font>
</b>
<input NAME="DeliveryFlightsQty" SIZE="5" VALUE="<%=FP_FieldHTML(fp_rs,"DeliveryFlightsQty")%>">
<input NAME="DeliveryFlightsPrice" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"DeliveryFlightsPrice")%>"></td>
<td align="right">
<%call dropDownMenu("Dropdown_Accessorial","DisplayValue","Accessorial04","OptionName",FP_FieldVal(fp_rs,"Accessorial04"))%></td>
<td width="85" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px">
<input TYPE="TEXT" NAME="AccessorialPrice04" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"AccessorialPrice04")%>"></td>
</tr>
<tr>
<td width="90" align="right" style="border-left-style: solid; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px; border-bottom-style:solid">
<b><font face="Arial" size="2">Addl. Miles:</font></b></td>
<td width="200" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px; border-bottom-style:solid">
<b><font face="Arial" style="font-size: 9pt">
Qty: </font>
</b>
<input NAME="AdtlMilesQty" SIZE="5" VALUE="<%=FP_FieldHTML(fp_rs,"AdtlMilesQty")%>">
<input NAME="AdtlMilesPrice" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"AdtlMilesPrice")%>"></td>
<td align="right" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px">
<%call dropDownMenu("Dropdown_Accessorial","DisplayValue","Accessorial05","OptionName",FP_FieldVal(fp_rs,"Accessorial05"))%></td>
<td width="85" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px; border-bottom-style:solid">
<input TYPE="TEXT" NAME="AccessorialPrice05" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"AccessorialPrice05")%>"></td>
</tr>
</table>
<table border="1" width="100%" id="table148" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#878750">
<tr>
<td> </td>
<td width="97">
<p align="center">
<input TYPE="TEXT" NAME="Total" SIZE="11" VALUE="<%=FP_FieldHTML(fp_rs,"Total")%>"></td>
</tr>
</table>
<table border="0" width="100%" id="table149" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<div align="center">
<table BORDER="0" width="454">
<tr>
<td>
<p align="center">
<input TYPE="Submit" NAME="fp_submit"><input TYPE="Reset" NAME="fp_reset"></td>
</tr>
</table>
</div>
<input type="hidden" name="IDShpmt" value="<%=FP_FieldHTML(fp_rs,"IDShpmt")%>">
</form>
<!--#include file="../../_fpclass/fpdbrgn2.inc"-->
<p>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p align="center"> </p>
<p align="center"> </div>
</body>
</html>
Here is the only difference between the two forms:
Update Last Record Form
fp_sQry="SELECT * FROM Query_Shipment WHERE ModifiedDate = (SELECT Max(ModifiedDate) FROM Query_Shipment);"
Update ID Record Form
fp_sQry="SELECT * FROM Query_Shipment WHERE (IDShpmt = ::IDShpmt::)"
To see it in action:
Update Last Record Form
http://sms.pianomove.com/enterprise/shipment_ent/main_shipment_ent_last_record.asp
This works great
Record List and update shipment based on ID
http://sms.pianomove.com/enterprise/shipment_ent/main_shipment_ent_shipment_list.asp
When you attempt to update the record, you'll get an error.
Can someone tell me what I am missing?
Allan