Forums
This topic is locked
SQL statement help
23 years ago Phuc Ngo posted:
Hi All!I have an Access DB with a checkbox field called "site_active" with the following
setting information:
Format: Yes/No
Default Value: Yes
Display Control: Check Box
How do I write an SQL statement just to display records with the checkbox marked (checked)in my database.
SELECT *
FROM Site
WHERE site_active ??? (equal all ckeckbox marked with a check)
Do I need to create a variable or something?
thanks
-dave
Replies
Replied 23 years ago
23 years ago Jon Shade replied:
if you go back into the design of that table (Site) and look at the field properties for site_active you should see the first option is Format. This probably defaults to Yes/No. If you didn't change the default, use WHERE site_active = 'Yes'
JonShade
JonShade
Replied 23 years ago
23 years ago Phuc Ngo replied:
Thanks! that works, but without the quote =)