Solved

Another Syntax Issue

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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…

708 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

12 Experts available now in Live!

Get 1:1 Help Now