Solved

Syntax Problem

Posted on 2014-12-31
2
121 Views
Last Modified: 2014-12-31
In query designer for an expression, what is wrong with this syntax?

TotQtyInsAndOuts: Nz(DSum("[QTY_ORDERED]","tblInventory", [TRNX_TYPE] in ('I','O')"),0)

--Steve
0
Comment
Question by:SteveL13
  • 2
2 Comments
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 40525898
You are missing a double quote in the Criteria string

TotQtyInsAndOuts: Nz(DSum("[QTY_ORDERED]","tblInventory", "[TRNX_TYPE] in ('I','O')"),0)
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 40525904
Although if you are doing this for many records, the DSUM() could make this a long running query.  You might be better off with some form of aggregate query based grouped on a specific field (either as a stand-alone or sub query) and then joining that query to this one.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now