Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Inserting an image from a Y value in an Access field

New Here ,
Jun 15, 2006 Jun 15, 2006
Using ASP/VBscript and Access
I'm making a page that dislays a listing of organisations (using Repeated Regions) concerned with disabilities. I want to use images for symbols that indicate whether, for example, an organisation uses textphones, has wheelchair access, and the like. I'm using a form to add new records to the database. I want the form to allow users to select the applicable symbols using checkboxes. What code will allow the listing page to interpret a Y value as an image path and ignore a N value.
Thanks
TOPICS
Server side applications
248
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jun 15, 2006 Jun 15, 2006
Assuming that you have text fields storing the Y N then on the output you
have a code block like this

<%
If recordset.fields.item("wheelchair").value = "Y" then
%>
<img src="images/wheelchair.gif">
<%End if%>

However is your field is set to be a Yes/No type then the best way is to
write the test like this

If recordset.fields.item("wheelchair").value = TRUE then


--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.va...
Translate
LEGEND ,
Jun 15, 2006 Jun 15, 2006
Assuming that you have text fields storing the Y N then on the output you
have a code block like this

<%
If recordset.fields.item("wheelchair").value = "Y" then
%>
<img src="images/wheelchair.gif">
<%End if%>

However is your field is set to be a Yes/No type then the best way is to
write the test like this

If recordset.fields.item("wheelchair").value = TRUE then


--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"Lancs" <webforumsuser@macromedia.com> wrote in message
news:e6srl5$jul$1@forums.macromedia.com...
> Using ASP/VBscript and Access
> I'm making a page that dislays a listing of organisations (using Repeated
> Regions) concerned with disabilities. I want to use images for symbols
> that
> indicate whether, for example, an organisation uses textphones, has
> wheelchair
> access, and the like. I'm using a form to add new records to the database.
> I
> want the form to allow users to select the applicable symbols using
> checkboxes.
> What code will allow the listing page to interpret a Y value as an image
> path
> and ignore a N value.
> Thanks
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 15, 2006 Jun 15, 2006
LATEST
That works a treat. Thanks very much (for the 2nd time in 2 days)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines