Closed Thread Icon

Topic awaiting preservation: Access database checkbox problem(ASP) (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12980" title="Pages that link to Topic awaiting preservation: Access database checkbox problem(ASP) (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Access database checkbox problem(ASP) <span class="small">(Page 1 of 1)</span>\

 
Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 11-13-2003 09:34

Hi, guys. How are you?
Please help me.
In my database (MS Access) I have database field which is checkbox.
And in my ASP file, I want to show Hiroki if it is checked otherwise just nothing:
Here is my piece of code but doesn't work.....

code:
<td><%If Request(x.value)= False Then Response.Write("Hiroki")  End If%></td>



And I also tried like:

code:
<%If IsEmpty(x.value) Then Response.Write("hiroki") End If%>



But niether of them doesn't work.....
When I wrote like:

code:
<%Response.Write("x.value")%>


That printed True or False. Then I thought...Ah~ I can use if statement to get what I want.
Hmm....Please help.

Hiroki Kozai

Rhino
Bipolar (III) Inmate

From: New Jersey, USA
Insane since: Jul 2003

posted posted 11-13-2003 10:31

I believe that Access stores the value as a 0 (zero) if not checked or a 1 if it is checked. This can also be interpreted as False = 0 and True = 1. The one piece I don't understand is why in the first example you gave, you are checking it as

Request(x.value) = False

wouldn't it just be

x.value = False

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 11-13-2003 21:20

Many many thanks for that.
It worked fine.
Have a great day!
Cheers, Rhino!

Hiroki Kozai

« BackwardsOnwards »

Show Forum Drop Down Menu