How to check checkbox from query results

J

Jim Buyens

-----Original Message-----
I have a query which is returning a True/False value to
my form. I want this result to be a checkbox, checked if
the value is true, and not checked otherwise. Any
ideas? Im stuck. I tried to set the checked value to
the returned value but it always comes up checked (and it
shouldn't).

The "checked" attribute must be either present or absent.
coding checked=false, for example, causes the box to be
checked.

In ASP, you would typically code this

<%if fieldvalue Then Response.Write " checked "%>

inside the <input type="checkbox") tag, where fieldvalue
expresses the true/false value from your database.

Jim Buyens
Microsoft FrontPage MVP
(e-mail address removed)
http://www.interlacken.com
Author of:
*------------------------------------------------------*
|\----------------------------------------------------/|
|| Microsoft Office FrontPage 2003 Inside Out ||
|| Microsoft FrontPage Version 2002 Inside Out ||
|| Web Database Development Step by Step .NET Edition ||
|| Troubleshooting Microsoft FrontPage 2002 ||
|| Faster Smarter Beginning Programming ||
|| (All from Microsoft Press) ||
|/----------------------------------------------------\|
*------------------------------------------------------*
 

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

Top