Solved

Another Syntax Issue

Posted on 2014-12-01
2
101 Views
Last Modified: 2014-12-01
What is wrong with:

=DMax("[QTY_ORDERED]","tblInventory","[PART_NO] = '" & [Reports]![rptQRY_REORDER_PT]![txtPART_NO] & "'"  AND "[TRNX_TYPE] = '"ORD"'")
0
Comment
Question by:SteveL13
2 Comments
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 500 total points
ID: 40474552
This last bit

"'"  AND "[TRNX_TYPE] = '"ORD"'")

Should be

"' AND [TRNX_TYPE] = 'ORD'")
0
 
LVL 33

Expert Comment

by:Mike Eghtebas
ID: 40474691
is [PART_NO] numeric? If so use:
=DMax("[QTY_ORDERED]","tblInventory","[PART_NO] = " & [Reports]![rptQRY_REORDER_PT]![txtPART_NO] & " AND  [TRNX_TYPE] = 'ORD'")

Open in new window


If it is text, then use as Philip has it, repeating all put together:
DMax("[QTY_ORDERED]","tblInventory","[PART_NO] = '" & [Reports]![rptQRY_REORDER_PT]![txtPART_NO] & "' AND  [TRNX_TYPE] = 'ORD'")

Open in new window

0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

803 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