By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,398 Members | 1,312 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,398 IT Pros & Developers. It's quick & easy.

Help with if statement in access

P: 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
Share this Question
Share on Google+
4 Replies


NeoPa
Expert Mod 15k+
P: 31,661
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

P: 2
[FirstDropYN] is in a query coming from a table.
Dec 14 '06 #3

NeoPa
Expert Mod 15k+
P: 31,661
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
Expert Mod 10K+
P: 14,534
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

Post your reply

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