Avatar of NUdovich2
NUdovich2
 asked on

Access Null Confusion

Simple query using query design view.  I have with account name, account, ID

If I run the query asking if account is null it lists all of the results where there is no account number but where there is an ID

I want to say that if the account is null then make the value default to that of the ID.

I have done this thousands of times but for some reason it isnt working here.  

I have

IIF([Account] is null, [ID], [Account])

Simple but it returns no values

Thanks in advance for your help.
DatabasesMicrosoft Access

Avatar of undefined
Last Comment
NUdovich2

8/22/2022 - Mon
SOLUTION
mbizup

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
mbizup

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
NUdovich2

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
IrogSinta

I just wanted to say that using the NZ function as mbizup suggested is more efficient than using the IIF function you used.  Your expression would look like this:

EXPR1:  Nz([Parent BPID], [bpid])

And it means exactly the same thing as your IIF expression.
NUdovich2

ASKER
It is what ultimately worked.
Your help has saved me hundreds of hours of internet surfing.
fblack61