473,394 Members | 1,878 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,394 software developers and data experts.

IF Statement for Yes/No Field

I have a field name "OTHERDEVICE", and this field is a Yes/No field. I am trying to create a querry that list all the "OTHERDEVICE " with a Yes answer (check mark in the field in the table).
I've tried several ways such as:
OtherYes: IIf([OTHERDEVICE]="True","yes")
OtherYes: IIf([OTHERDEVICE]="Yes","yes")
OtherYes: IIf([OTHERDEVICE] is not null,"yes")
The first two gave me "Errror" as a result
The third gave me all "Yes" even OTHERDEVICE didn't check.

Can anybody help?
Thanks alot and have a nice weekend!
elaine
Jul 13 '07 #1
2 4740
puppydogbuddy
1,923 Expert 1GB
I have a field name "OTHERDEVICE", and this field is a Yes/No field. I am trying to create a querry that list all the "OTHERDEVICE " with a Yes answer (check mark in the field in the table).
I've tried several ways such as:
OtherYes: IIf([OTHERDEVICE]="True","yes")
OtherYes: IIf([OTHERDEVICE]="Yes","yes")
OtherYes: IIf([OTHERDEVICE] is not null,"yes")
The first two gave me "Errror" as a result
The third gave me all "Yes" even OTHERDEVICE didn't check.

Can anybody help?
Thanks alot and have a nice weekend!
elaine

Select * From YourTable Where OTHERDEVICE = True
Jul 13 '07 #2
Select * From YourTable Where OTHERDEVICE = True

Thanks alot!
Elaine
Jul 13 '07 #3

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

Similar topics

2
by: ghasem | last post by:
Dear mySQL community, I have once again turned to the user groups for a problem I cannot solve myself! Atually, I have read all I can from the newsgroups on this but I could not solve it myself....
4
by: jbow0527 | last post by:
Here is what I have: Table1 with two key fields: PartNum and WH# (warehouse number) Table2 with only one key field: PartNum Both tables contain a field called Price. I want to update Table1...
3
by: Peter Phelps | last post by:
My problem is as follows: I need automatically iterate through a single field in a table and use the values in the field to create an in-statement. Currently, the character limitation in the...
7
by: mark | last post by:
Access 2000: I creating a report that has a record source built by the user who selects the WHERE values. An example is: SELECT * FROM CHARGELOG WHERE STDATE Between #10/27/2003# And...
4
by: kathy | last post by:
Working in a form, I have an Iif statement where if a date is not filled in, another field will show as a blank. If the date IS filled in, the 2nd field will show its actual value. The following...
10
by: SueB | last post by:
I currently have a 'mail-merge' process in my Access db project. It generates custom filled out Award Certificates based on an SQL SELECT statement in a VBA routine invoked by clicking on a...
4
by: dkelly925 | last post by:
I have an Access Report that I am trying to enter an "If Statement" that when a certain field exceeds a certain number of lines or a certain number of characters that field is not visible and...
4
by: Dave | last post by:
I have a field with data type of memo in my access database. I run a query from c# to access this field and it cuts off my string to only 255 characters. If i run this query directly in access...
1
by: glenn | last post by:
Hi folks, I am using an Access database, VB.NET and ADO.NET working with a DataGrid control. MY datagrid table has both a date_sent and a date_ans field. When I Insert a record in my SQL...
3
by: sql2020 | last post by:
hi, i am fresh grad and wondering whether this idea can be done.. i have 1 ComboBox and 2 ListBox. ComboBox contain list of table, when user select a table, it will list the field name for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.