Solved

Another Syntax Issue

Posted on 2014-12-01
2
100 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

914 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

16 Experts available now in Live!

Get 1:1 Help Now