Solved

Syntax Problem

Posted on 2014-12-31
2
126 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Familiarize people with the process of utilizing SQL Server views 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 Microsoft Access…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

856 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