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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

response.write field in ms access 2

Status
Not open for further replies.

stpmtp

MIS
Jan 6, 2006
67
US
I have an access db I have 3 fields, A, B and C

I have an asp script that goes on Field C
Code:
<%if rsget("FieldB") = rsget("FieldA") then response.Write(Recordset1("FieldB")) %>

Field A has all the records, Field B has records that have been entered and In field C you are supposed to see the result of field B if the record exists on Field A.

This works well with only the first record but after that I get nothing. Is there a way to do this?
 
you mean:
Code:
do until rsget.EOF
<%if rsget("FieldB") = rsget("FieldA") then response.Write(Recordset1("FieldB")) %>
rsget.Movenext
Loop

-DNG
 
if I had more field would I have to do this in every field?
 
to work with multiple records you need to place this within a loop of some kind ex.

Code:
Do While Not rsget.EOF

if rsget("FieldB") = rsget("FieldA") then response.Write(rsget("FieldB"))
'notice i change recordset1 to rsget

rsget.MoveNext
Loop
 
Are rsget and Recordset1 separate ado recordset objects?
 
have the loop only once...something like this


Code:
<%
do until rsget.EOF
response.Write(Recordset1("FieldB"))
response.Write(Recordset1("FieldC"))
response.Write(Recordset1("FieldD"))
rsget.Movenext
Loop
%>

-DNG
 
ahhh works very well thank you very, very much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top