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!

adding yes- nos to asp from access 2

Status
Not open for further replies.

welshone

Programmer
Jul 30, 2001
414
GB
ello,
I am trying to show Access data through an asp page, so my users can Edit the data.

I can show most fields by using:

value=&quot;<%=rsamend.fields(&quot;Field_Name&quot;)%>&quot;

but when it comes to yes/no boxes using the above brings back blanks.

what do I need to do to show the data.
(the data is in 'on' or 'is null' form....


thanks in advance
Jamie
 
for yes/no field:

if rsamend.fields(&quot;Field_Name&quot;) = True Then
response.write (&quot;Yes&quot;)
else
response.write (&quot;No&quot;)
end if
 
Something like this possibly:
<%
If rsamend.fields(&quot;Field_Name&quot;) = True Then
%>
<INPUT type=&quot;checkbox&quot; id=checkbox1 name=checkbox1 checked>
<%
Else
%>
<INPUT type=&quot;checkbox&quot; id=checkbox1 name=checkbox1>
<%
End If
%>
 
sorry, missed the point of filling the input fields....

could even shorten Mithrilhall's code to:

<INPUT type=&quot;checkbox&quot; id=&quot;checkbox1&quot; name=&quot;checkbox1&quot; <% If rsamend.fields(&quot;Field_Name&quot;) = True Then %>checked <% End If %>>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top