your input will be highly appreciated.worked on this all thru yesterday without sucess
I am displaying data from my access DB into a form that shows one record with the select statement below
SELECT * FROM tblopgaCOm2 WHERE billNo = '" & Request.Form("BILLNO") & "' AND area LIKE 'AUDIT'"
Example -The same "billNO"-d456 appears more than once but the "area" makes it unique ie billNo d456 can appear 3 times but for different areas like audit, finance, accounting. Therefore the sql above displays billNo eg d456 in the audit area.
On the same form or at least the same page i want to include another Textbox that will capture or display the other "area" where billNo d456 appears. So a user will not only see what the above sql displays but also the other areas the bill was assigned. Therefore I may need another sql statement to do this like below;
SELECT area FROM tblopgaCOm2 WHERE billNo = '" &
Request.Form("BILLNO") "
I guess I need to include 2 record sets for the 2sql statements??? but do not know how.with what has been built so far I get no errors but the new textbox field which should be populated with the second sql is NOT.
below is the code built so far;
dim Rs1
dim Rs2
dim sSQL
dim StrbillNo
on error resume next
Test = request.querystring("Test")
StrbillNo = Trim(Request.form("billNo"))
Set Conn = Server.CreateObject("ADODB.Connection")
Set Rs1 = Server.CreateObject("adodb.Recordset")
Set Rs2 = Server.CreateObject("adodb.Recordset")
Conn.Open "eiwp"
sSQL = "Select * from tblopgaCOm2 WHERE Test = " & Test
Rs1.Open sSQL ,Conn
sSQL ="Select area FROM tblopgaCOm2 WHERE billNo = '" & Request.Form("billNO")& "'"
Rs2.Open sSQL ,Conn
Rs1.MoveFirst
%>
(below is some lines of html codes with the rest of asp codes)
<input type="text" name="billNo" style="background-color: #D2D2D2" size="9" value="<%=Rs1("billNo")%>" readonly></td>
<input type="text" name="area" style="background-color: #D2D2D2; color: #FF0000; font-weight: bold; text-align: Left" size="8" value="<%=Rs1("area")%>" readonly>
<textarea rows="8" name="priorcomments" readonly style="background-color: #D2D2D2" cols="50"><%=Rs1("priorcomments")%></textarea>
<% do until Rs2.EOF = true
sText = sText & Rs2("area") & ","
Rs2.MoveNext
loop
%>
<tr>
<td width="23%" bgcolor="#99CCFF" height="36"><font size="2"><b>DESCRIPTION:</b></font></td>
<td width="239%" bgcolor="#E2E0E1" height="36" colspan="4"><textarea rows="4" name="Description" readonly style="background-color: #D2D2D2" cols="30"><%Response.Write chr(34) & sText & chr(34) %></textarea>
<td width="52%" height="36"> </td>
<tr>