Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set a criteria in a query for a checkbox?

Status
Not open for further replies.

OverDrive

IS-IT--Management
Dec 11, 2000
268
US
How do I set a criteria in a query for a checkbox>?

I have tried "true" and "-1" but that is not working?

I should also mention that I have other fields with criteria in them as well... if it matters or not I am not sure?

Thanks
Chance~

 
Specify the value of the checkbox:

Code:
chkEdited.Value = True

< M!ke >
 
I place that in the criteria and it throws out an error?
 
If you post your query, it would help know where/how to implement...

< M!ke >
 
SELECT [tblMain].[DispositionStatus], [tblMain].[IndictmentDate], [tblMain].[FirstName], [tblMain].[LastName], [tblMain].[AUSAAssigned], [tblMain].[IndictmentNumber], [tblMain].[DispositionDate], [tblMain].[IndictedYes]
FROM tblMain
WHERE ((([tblMain].[DispositionStatus])=&quot;IN&quot;))
ORDER BY [tblMain].[IndictmentDate];
 
&quot;IndictedYes&quot; is the checkbox field I am trying to get to set a criteria to &quot;True&quot;

 
I must not understand what you're trying to do; I don't see a reference to where you're trying to set a checkbox criteria in this query?

< M!ke >
 
Hows This....

SELECT tblMain.DispositionStatus, tblMain.IndictmentDate, tblMain.FirstName, tblMain.LastName, tblMain.AUSAAssigned, tblMain.IndictmentNumber, tblMain.DispositionDate, tblMain.IndictedYes
FROM tblMain
WHERE (((tblMain.DispositionStatus)=&quot;IN&quot;) AND ((tblMain.IndictedYes)=&quot;Ture&quot;))
ORDER BY tblMain.IndictmentDate;
 
I meant to place &quot;True&quot; in that criteria not &quot;Ture&quot;

It still does the same thing with &quot;True&quot;

THANKS!
Chance~
 
Actually, someone mentioned to me that boolen needs to be &quot;without quotes&quot;

I tried it without the quotes and it worked!

Thanks!!
Chance~
 
Hey, great! Now we both can get some sleep tonight! LOL!

< M!ke >
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top