RETIEVING INFOR FROM ACCESS DB ON MY ASP PAGE

I

iffy agbim

I have a form that displays information selected from an Access Data
base. A select statement is used to do this on my asp page
SQLQuery = "SELECT * FROM tblopgaCOm2 WHERE billNo = '"

& Request.Form("BILLNO") & "' AND area LIKE 'AUDIT'"

billNo and area are the 2 fields used together to make the record we
need unique. example Bill d456(billNo) can be
assigned to various depts(area). as many depts as it is
assigned rep the many times it is used. ie therefore Bill d456
assigned to the audit, finance and Hresources appears 3 times.
Therefore for me to pull the record rep Bill d456 for the audit dept I
have do a select * by billNo and area like "AUDIT" as above.
This infor like I said is displayed in a form so the user also has the
ability to add or update this displayed infor.


Now this is what I want to do,
include an input box(readonly) that is also required to capture the
various dept(area) where the Billno d456 has been assigned.just one
input box that will show me that the same billNo d456 was also assigned
to not just the audit dept but also the finance & humanresource dept. so
the input box will just show the result "audit, finance & Hresource.
How do I get around this .
Is it to have 2 select statements on a page /form??
If that is the answer then how do I go about that
below is my exsisting script.Thanks as always!!!

<%

Set Conn = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("adodb.Recordset")
Conn.Open "eiwp"
SQLQuery = "SELECT * FROM tblopgaCOm2 WHERE billNo = '" &
Request.Form("BILLNO") & "' AND area LIKE 'AUDIT'"
RS.Open SQLquery, Conn

%>

<table border="0" cellpadding="2" cellspacing="4" width="120%">
<tr>
<td width="100%">

<form method="POST" action="legconfirm.asp" >
<table border="0" cellpadding="2" cellspacing="4" width="121%"
height="172">
<tr>
<td width="20%" bgcolor="#99CCFF" height="36">&nbsp;<b><font
size="2">ID#:
</font> </b><input type="text" name="Test"
style="background-color: #D2D2D2" size="9" value="<%=RS("Test")%>"
readonly></td>
<td width="49%" bgcolor="#99CCFF" height="36">&nbsp;<b><font
size="2">BILL</font>#</b>
<input type="text" name="billNo" style="background-color: #D2D2D2"
size="9" value="<%=RS("billNo")%>" readonly></td>
<td width="129%" height="36" bgcolor="#C0C0C0">
<p align="left"><b><font color="#000080"><input type="text"
name="area" style="background-color: #D2D2D2; color: #FF0000;
font-weight: bold; text-align: Left" size="8" value="<%=RS("area")%>"
readonly></font></b></p>
</td>
<td width="28%" bgcolor="#99CCFF" height="36"><font
size="2"><b>TIME:<input type="text" name="Time" readonly
style="background-color: #D2D2D2" size="10"
value="<%=RS("updDate")%>"></b></font></td>
</table>
</form>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top