Link to home
Start Free TrialLog in
Avatar of ba272
ba272

asked on

SQL Problem with Yes/No field in Access

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
Avatar of Brian Mulder
Brian Mulder
Flag of Netherlands image

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
ASKER CERTIFIED SOLUTION
Avatar of Mohammed Nasman
Mohammed Nasman
Flag of Palestine, State of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ba272
ba272

ASKER

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