Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing values from one Recordset to another Form 1

Status
Not open for further replies.

schase

Technical User
Sep 7, 2001
1,756
US
Hi All,

For Connections, I use include statement. Using Access97


I have one page that displays vehicle information in detail from a database - it uses a connection called "hondas", recordset is called rsInventory database called hondas.mdb - No problems here - it Pulls A-OK.

There is also a form on the page for a visitor to input their information - this populates a database called customers.mdb, using connection called "customers", recordset called "Recordset1" By itself this also populates A-OK.

BUT when I try to combine the two - pulling fields displayed by the first recordset into Hidden field items to populate the second database - it populates as NULL - all fields are named correctly.

Code is below - will I need to have the information from the first recordset be displayed in text box's? It is displayed in a table.

++++++++++++++++++++++++++++++++++
<form ACTION=&quot;<%=MM_editAction%>&quot; METHOD=&quot;POST&quot; name=&quot;form1&quot;>
<input name=&quot;_recipients&quot; type=&quot;hidden&quot; value=&quot;eph@elpasohonda.com&quot;>
<input name=&quot;_requiredFields&quot; type=&quot;hidden&quot; value=&quot;Title,First_Name,Last_Name,Address,City,State,Zip,EMail,Home_Phone&quot;>
<input name=&quot;_fieldOrder&quot; type=&quot;hidden&quot; value=&quot;Title,First_Name,Last_Name,Address,City,State,Zip,EMail,Home_Phone,Stock,ModelNumber,ModelName,Trim,Transmission,Color,VIN,Invoice&quot;>
<input name=&quot;_replyTo&quot; type=&quot;hidden&quot; value=&quot;info@myhonda.net&quot;>
<input name=&quot;_subject&quot; type=&quot;hidden&quot; value=&quot;myhonda.net quote request&quot;>
<input type=&quot;hidden&quot; name=&quot;Stock&quot;>
<input type=&quot;hidden&quot; name=&quot;ModelNumber&quot;>
<input type=&quot;hidden&quot; name=&quot;ModelName&quot;>
<input type=&quot;hidden&quot; name=&quot;Trim&quot;>
<input type=&quot;hidden&quot; name=&quot;Transmission&quot;>
<input type=&quot;hidden&quot; name=&quot;Color&quot;>
<input type=&quot;hidden&quot; name=&quot;VIN&quot;>
<input type=&quot;hidden&quot; name=&quot;Invoice&quot;>
<table align=&quot;center&quot; width=&quot;460&quot; height=&quot;200&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot;>


Stuart
 
Well you need to write some values for the hidden fields -

Code:
<input type=&quot;hidden&quot; name=&quot;Stock&quot; value=&quot;<%= rsInventory(&quot;Stock&quot;)%>&quot;>
 
ahhhhhhhhhhhh lemme give that a shot. I thought it would pull it from the displayed sections above - same field name.

Stuart
 
Nothing - Still populates as NULL.

+++++++++

form ACTION=&quot;<%=MM_editAction%>&quot; METHOD=&quot;POST&quot; name=&quot;form1&quot;>
<input name=&quot;_recipients&quot; type=&quot;hidden&quot; value=&quot;eph@elpasohonda.com&quot;>
<input name=&quot;_requiredFields&quot; type=&quot;hidden&quot; value=&quot;Title,First_Name,Last_Name,Address,City,State,Zip,EMail,Home_Phone&quot;>
<input name=&quot;_fieldOrder&quot; type=&quot;hidden&quot; value=&quot;Title,First_Name,Last_Name,Address,City,State,Zip,EMail,Home_Phone,Stock,ModelNumber,ModelName,Trim,Color,VIN,Invoice&quot;>
<input name=&quot;_replyTo&quot; type=&quot;hidden&quot; value=&quot;info@myhonda.net&quot;>
<input name=&quot;_subject&quot; type=&quot;hidden&quot; value=&quot;myhonda.net quote request&quot;>
<input type=&quot;hidden&quot; name=&quot;Stock&quot; Value=&quot;<%=(rsInventory.Fields.Item(&quot;Stock&quot;).Value)%>&quot;>
<input type=&quot;hidden&quot; name=&quot;ModelNumber&quot; Value=&quot;<%=(rsInventory.Fields.Item(&quot;ModelNumber&quot;).Value)%>&quot;>
<input type=&quot;hidden&quot; name=&quot;ModelName&quot; Value=&quot;<%=(rsInventory.Fields.Item(&quot;ModelName&quot;).Value)%>&quot;>
<input type=&quot;hidden&quot; name=&quot;Trim&quot; Value=&quot;<%=(rsInventory.Fields.Item(&quot;Trim&quot;).Value)%>&quot;>
<input type=&quot;hidden&quot; name=&quot;Color&quot; Value=&quot;<%=(rsInventory.Fields.Item(&quot;Color&quot;).Value)%>&quot;>
<input type=&quot;hidden&quot; name=&quot;VIN&quot; Value=&quot;<%=(rsInventory.Fields.Item(&quot;VIN&quot;).Value)%>&quot;>
<input type=&quot;hidden&quot; name=&quot;Invoice&quot; Value=&quot;<%= FormatCurrency((rsInventory.Fields.Item(&quot;Invoice&quot;).Value)+440, 2, -2, -2, -2) %>&quot;>

Stuart
 
GOT IT!

Found an error in the insert code.



Stuart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top