?
Solved

Syntax Problem

Posted on 2014-12-31
2
Medium Priority
?
141 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 49

Accepted Solution

by:
Dale Fye earned 2000 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 49

Expert Comment

by:Dale Fye
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Suggested Courses

840 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