473,411 Members | 1,899 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

How to make Criteria in a Yes/No Field

2
sori didn't read first the guidelines. i am using Access 2003.
Farmers - text data type
Planting Information - Yes/No data type
Harvesting Information - Yes/No data type
In the query, how can i make a criteria on a yes/no data type?so that the outcome will be the farmers name and only those which has a check mark signifying that they want this kind of brochure.it can not include the other field names which doesn't have a check mark.


note: planting information and harvesting are brochures to be given to the farmer if they want information regarding for example planting or harvesting procedure.
thanks

julie
Feb 24 '07 #1
3 8154
vijaydiwakar
579 512MB
sori didn't read first the guidelines. i am using Access 2003.
Farmers - text data type
Planting Information - Yes/No data type
Harvesting Information - Yes/No data type
In the query, how can i make a criteria on a yes/no data type?so that the outcome will be the farmers name and only those which has a check mark signifying that they want this kind of brochure.it can not include the other field names which doesn't have a check mark.


note: planting information and harvesting are brochures to be given to the farmer if they want information regarding for example planting or harvesting procedure.
thanks

julie
julie, u have to use true or false keyword as
select * from table where <fieldname>=true
Feb 24 '07 #2
MMcCarthy
14,534 Expert Mod 8TB
Julie is this what you are looking for ...

Expand|Select|Wrap|Line Numbers
  1. SELECT Farmers
  2. FROM TableName
  3. WHERE [Planting Information] = True;
Expand|Select|Wrap|Line Numbers
  1. SELECT Farmers
  2. FROM TableName
  3. WHERE [Harvesting Information] = True;
Feb 24 '07 #3
NeoPa
32,556 Expert Mod 16PB
I hate to be contradictory (I love it really :D), but you should very rarely, if ever, compare a boolean result with either TRUE or FALSE. The most reliable (and recommended) way to check boolean values is simply by using them as booleans.
Expand|Select|Wrap|Line Numbers
  1. SELECT Farmers
  2. FROM TableName
  3. WHERE [Planting Information];
Expand|Select|Wrap|Line Numbers
  1. SELECT Farmers
  2. FROM TableName
  3. WHERE [Harvesting Information];
Anyone ever tells you different - send them to me :D
Feb 26 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: AAVF | last post by:
Hi We have a problem with a query. An Access database links via ODBC to a UNIX server. To speed things, we use the ODBC to load the relevant tables to the local PC that runs Access so that...
3
by: pelcovits | last post by:
I am trying to set up an unbound form to enter report criteria. I've followed the MS Office Assistance document: "Create a form to enter report criteria" which describes how to enter data (such...
1
by: S. van Beek | last post by:
Dear reader, How can I filter a numeric field with Like as criteria in a query. To filter a numeric field with <10 as criteria this will com back with the result of those records for which...
0
by: Greg Strong | last post by:
Hello All, In the past I've used a combo box with the 'row source' being an Access SQL union query to select "All" or 1 for only 1 criteria in a query. An example is as follows: SELECT 0 As...
0
by: MLH | last post by:
I have an A97 query (qryVehiclesNowners2) that has a table field in it named . Depending on the selections made in a number of criteria choices on a form, a field on the form will have string...
3
by: MLH | last post by:
Am repeating question with different subject heading, perhaps stating more clearly my problem... I have an A97 query (qryVehiclesNowners2) that has a table field in it named . Depending on the...
1
by: chris_huh | last post by:
Using the Label Wezard you can easily make labels for all the records in the table, but is there a way to make just one. I have a form that shows the data from a single recordset and on that...
10
by: aaronrm | last post by:
I have a real simple cross-tab query that I am trying to sum on as the action but I am getting the "data type mismatch criteria expression" error. About three queries up the food chain from this...
1
klarae99
by: klarae99 | last post by:
I am new to this forum and new to Access 2003...this is my first database that is more than a table and some reports. The database I am working on is for inventory control. My current project is to...
17
by: sharsy | last post by:
Hello guys, I would like some help in generating query criteria that will identify credit cards that have expired on an access database. The specific Field is formatted with a Data Type of...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.