?
Solved

Syntax Problem

Posted on 2014-12-31
2
Medium Priority
?
135 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 48

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 48

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

762 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