473,385 Members | 2,015 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,385 software developers and data experts.

Help with if statement in access

2
Access 2000 using windows xp with sql database.

I have an if statement in a report and when trying to do a statement on a check box field out of a query is always returns a "N". =IIf(([FirstDropYN]),"N","Y") The field is either 0 or -1

I have tried =0, =-1, ="0", ="-1", =False, =True, =Yes, is null everything returns a #Error.
Dec 14 '06 #1
4 3046
NeoPa
32,556 Expert Mod 16PB
Access 2000 using windows xp with sql database.

I have an if statement in a report and when trying to do a statement on a check box field out of a query is always returns a "N". =IIf(([FirstDropYN]),"N","Y") The field is either 0 or -1

I have tried =0, =-1, ="0", ="-1", =False, =True, =Yes, is null everything returns a #Error.
Where is [FirstDropYN] stored?
If it's on a form then your problem is that the form is not visible (accessible) from the report.
Dec 14 '06 #2
sbyrd
2
[FirstDropYN] is in a query coming from a table.
Dec 14 '06 #3
NeoPa
32,556 Expert Mod 16PB
In that case I would expect your first example (that is the best way to code it BTW) to work. The only thing I can think of is to assign this value to another field then check that 'Report' field. I've had situations like that before but I don't think it was a situation exactly like this. I'm afraid I don't remember the details.
Dec 14 '06 #4
MMcCarthy
14,534 Expert Mod 8TB
Access 2000 using windows xp with sql database.

I have an if statement in a report and when trying to do a statement on a check box field out of a query is always returns a "N". =IIf(([FirstDropYN]),"N","Y") The field is either 0 or -1

I have tried =0, =-1, ="0", ="-1", =False, =True, =Yes, is null everything returns a #Error.
You may have to include a control for [FirstDropYN] and set it to invisible for the statement to find the value in it.

Mary
Dec 15 '06 #5

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

Similar topics

2
by: Edwinah63 | last post by:
Hi Everyone, All the very best for 2004!! i need urgent help with this problem, the users are about to skin me alive!! we have an access front end with linked to sql server 2k tables. ...
2
by: Amanda | last post by:
From a guy in Microsoft newsgroups: | In *comp.databases.ibm-db2* there are always IBM guys | from the Toronto labs on line.Post with the | -for the love of god please help- | line...
2
by: Enterprise | last post by:
I'm stuck. I use Access 2000. I have a date field in a query. What I need done is if a Limit_Date function returns a true, I want the date field to be Between 1/1/02 and 1/1/03, otherwise I want it...
6
by: kaosyeti | last post by:
is there a way to create simple help file that i plan on linking to a command button on a form using what's already in access? i will probably be giving out this db that i've written to a number...
28
by: Siv | last post by:
Hi, If I run the following: strSQL = "Select * FROM Clients;" da = New OleDb.OleDbDataAdapter(strSQL, Conn) 'Create data adapter cb = New OleDb.OleDbCommandBuilder(da) ...
1
by: David | last post by:
Hi, I cannot get the following (MS Access) SQL statement working in my asp page, please can anyone help me ? Thanks :-) ------------------------------------------------ <% strQuery =...
2
by: Greg Corradini | last post by:
Hello All, A few weeks ago, I wrote two scripts using mx.ODBC on an Access DB. Among other things, both scripts create new tables, perform a query and then populate the tables with data in a...
2
by: eskelies | last post by:
So here is my issue. I have a multiple IF statement in Excel 2003, which I am trying to convert to Access 2003. My error in Access has to do with the OR function , which is taking place inside the IF...
6
by: troy_lee | last post by:
I am trying to count the total number of units for a given part number that have a Priority rating of 1. Based upon some research, this is what I came up with for my query. Access says that I have...
0
by: LanaR | last post by:
Hello, one sql statement is causing severe performance issue. The problem occurs only in UDB environment, the same statemnt on the mainframe is running fine. I have an explain output from the sql....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...

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.