Link to home
Start Free TrialLog in
Avatar of Robert Schumann
Robert SchumannFlag for United States of America

asked on

Report Textbox Expression error

HI

Where am I going wrong with this expression.  It's returning all Invoice values.  If I drop the last part  And "[id]=19 it returns the correct value.

=Nz(DSum("Invoice","PurchaseOrders","[ordertype]='opex'" And "[id]=19"),0)

Thanks
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Try with:

=Nz(DSum("Invoice","PurchaseOrders","[ordertype]='opex' And [id]=19"),0)

Open in new window

Avatar of Robert Schumann

ASKER

Great, it's working.  Thanks

Now, I need to add another criteria.  Tried this, but it returns "$0.00"  Thought I could just add an addition "AND".

=Nz(DSum("Invoice","PurchaseOrders","[ordertype]='opex' And [id]=19 And [id]=17"),0)
Id cannot be both 17 and 19.
ASKER CERTIFIED SOLUTION
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you all.  Great help!!
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you both.  They were both great answers!!