Solved

SQL Problem with Yes/No field in Access

Posted on 2006-07-23
3
248 Views
Last Modified: 2010-04-16
Hi,

I have added a column to ab Access table called "Active" and it's a Yes/No field.  It's part of my test environment so I can have completed records in the database that my program will ignore, until I check the checkbox to activate the record.

Oddly it works on some tables but not others.  When running in "TestMode" I add the following to each line of SQL.

" AND Active=1";

In other words I'm appending one final condition to my WHERE clause.  And like I said, it works on some tables but not others.  Any ideas?

Thanks,
Bob
0
Comment
Question by:ba272
3 Comments
 
LVL 44

Expert Comment

by:bruintje
ID: 17165857
Hi ba272,
----------

if it works on some tables and not on others, then why not try to deubg to the sql and run that query in the access query window to see if it returns the records you expect it could be several things so testing the sql that comes out of your program in the query window is a way to find out if its in the code or in the table you try to access

----------
bruintje
0
 
LVL 22

Accepted Solution

by:
Mohammed Nasman earned 500 total points
ID: 17165891
try

"and active = true"
0
 

Author Comment

by:ba272
ID: 17167387
mnasman,

That worked.  I had tried the following:

and active='true'

which didn't work as you'd expect, before I'd posted the question.

Thanks,
Bob
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question