Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Query On A Check Box Field


Message #1 by "Pat Wong" <vinyl-junkie@n...> on Mon, 10 Feb 2003 06:38:50 -0800
How do I set up a query on a field that is a check box? Right now, I have:
WHERE tblAlbums.Trade > ''    <-- Note: that's two single quotes

I'm getting a data type mismatch error, so that obviously isn't the correct way to do it but I
don't know what is. Help!


~8^) Pat Wong (ICQ #61070813)
http://www.napathon.com/
-------------------------------------------------------------------
Senility Prayer:
God grant me the senility to forget the people I never
liked anyway, the good fortune to run into the ones I
like, and the eyesight to tell the difference.
-------------------------------------------------------------------

Message #2 by imran.saleem@b... on Mon, 10 Feb 2003 14:44:27 -0000
never tried it but you might wanna try 
WHERE tblAlbums.Trade = 'on'

-----Original Message-----
From: Pat Wong [mailto:vinyl-junkie@n...]
Sent: Monday, February 10, 2003 2:39 PM
To: ASP Databases
Subject: [asp_databases] Query On A Check Box Field


How do I set up a query on a field that is a check box? Right now, I have:
WHERE tblAlbums.Trade > ''    <-- Note: that's two single quotes

I'm getting a data type mismatch error, so that obviously isn't the correct
way to do it but I
don't know what is. Help!


~8^) Pat Wong (ICQ #61070813)
http://www.napathon.com/
-------------------------------------------------------------------
Senility Prayer:
God grant me the senility to forget the people I never
liked anyway, the good fortune to run into the ones I
like, and the eyesight to tell the difference.
-------------------------------------------------------------------


Message #3 by "Drew, Ron" <RDrew@B...> on Mon, 10 Feb 2003 10:31:37 -0500
How is your DB set up for the field?  Yes/No..  On/Off..
Checked/NotChecked..  0/1
Do you want to test for the field and then set the checkbox accordingly
when it displays?

Maybe first run a
SELECT distinct tblAlbums.Trade FROM  table
To see the data you have first.

-----Original Message-----
From: Pat Wong [mailto:vinyl-junkie@n...]
Sent: Monday, February 10, 2003 9:39 AM
To: ASP Databases
Subject: [asp_databases] Query On A Check Box Field


How do I set up a query on a field that is a check box? Right now, I
have:
WHERE tblAlbums.Trade > ''    <-- Note: that's two single quotes

I'm getting a data type mismatch error, so that obviously isn't the
correct way to do it but I don't know what is. Help!


~8^) Pat Wong (ICQ #61070813)
http://www.napathon.com/
-------------------------------------------------------------------
Senility Prayer:
God grant me the senility to forget the people I never
liked anyway, the good fortune to run into the ones I
like, and the eyesight to tell the difference.
-------------------------------------------------------------------


Message #4 by "Pat Wong" <vinyl-junkie@n...> on Mon, 10 Feb 2003 07:34:56 -0800
Didn't work, but I built on your suggestion and found what did work. Here it is:

WHERE tblAlbums.Trade = yes

Thanks for your help! You pointed me toward the right path. 

----- Original Message ----- 
From: <imran.saleem@b...>
To: "ASP Databases" <asp_databases@p...>
Sent: Monday, February 10, 2003 6:44 AM
Subject: [asp_databases] RE: Query On A Check Box Field


| never tried it but you might wanna try 
| WHERE tblAlbums.Trade = 'on'
| 
| -----Original Message-----
| From: Pat Wong [mailto:vinyl-junkie@n...]
| Sent: Monday, February 10, 2003 2:39 PM
| To: ASP Databases
| Subject: [asp_databases] Query On A Check Box Field
| 
| 
| How do I set up a query on a field that is a check box? Right now, I have:
| WHERE tblAlbums.Trade > ''    <-- Note: that's two single quotes
| 
| I'm getting a data type mismatch error, so that obviously isn't the correct
| way to do it but I
| don't know what is. Help!
| 
| 
| ~8^) Pat Wong (ICQ #61070813)
| http://www.napathon.com/
| -------------------------------------------------------------------
| Senility Prayer:
| God grant me the senility to forget the people I never
| liked anyway, the good fortune to run into the ones I
| like, and the eyesight to tell the difference.
| -------------------------------------------------------------------
| 
| 
| 
| 

  Return to Index