Avatar of Mark Drelinger
Mark DrelingerFlag for United States of America

asked on 

Help making a microsoft access query more efficient.

I have an access query that works fine, but it is slow.  I feel like perhaps there is a better way to write it? 


tot0: IIf([Administrator_VhTrans]![wholesale] Is Null,0,[Administrator_VhTrans]![wholesale])+IIf([Administrator_VhTrans]![Option_Cost] Is Null,0,[Administrator_VhTrans]![Option_Cost])

Microsoft Access

Avatar of undefined
Last Comment
Jim Dettman (EE MVE)
Avatar of Mark Drelinger
Mark Drelinger
Flag of United States of America image

ASKER

Note: the field sometimes contains a null value, throwing off my results. If it is null, I need it  to be zero.

ASKER CERTIFIED SOLUTION
Avatar of ste5an
ste5an
Flag of Germany image

Blurred text
THIS SOLUTION IS 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
Avatar of Mark Drelinger

ASKER

perfect. I forgot about Nz to return a zero.  thank you.
Take it a step further if you can; don't allow null in the field and default it to zero.

Jim.
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo