Displaying a check mark from a database results form

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

I am using a microsoft access Database, and the db
results. One of the fields in the database is a Yes/no
field. I want to display something like a check mark or a
check box, filled in, on the results page. Currently it
diplays a TRUE or FALSE. Anyone have any ideas???
 
Hi Michael,

Assuming that the visitor will not be allowed to changed the check mark two
images will be used one of a check mark and the other blank.

Next select the field that contains the check mark in design view then
switch to HTML / Code view. The table cell for the check mark will be
hi-lighted. Find the code that begins with <% and ends with %>. It will look
something like this
FP_FieldVal(fp_rs,"Discontinued")

Change that code to
<img src="<% if FP_FieldVal(fp_rs,"Discontinued") = "false" then
response.write("images/nocheck.gif") else response.write("images/check.gif")
end if %>" >

Which displays the check mark image based upon the value of the database
field.
 
Back
Top