Solved

Find DMax for values that begin with specific characters within a field-MS Access

Posted on 2012-03-21
2
319 Views
Last Modified: 2012-03-21
Is it possible to find the DMax for a group of values that begin with specific characters?

Example:  Let's say I have the following values in a table called Table1 and stored in field called Field1. I know that DMax("Field1", "Table1") will return the maximum value (N060006) for all values in Field1, but what would I need to do if I wanted to return the DMax value for only the values in Field1 that start with N05?  Is this possible?

N040012
N040013
N050001
N050002
N050009
N060004
N060005
N060006

I appreciate any suggestions that anyone may have.
0
Comment
Question by:giswest
2 Comments
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 37747814
Sure, the DMAX domain function accepts three arguments, the third is a criteria string.

strCriteria = "Left([Field1], 3) = " & chr$(34) & "N05" & chr$(34)

?DMAX("Field1", "Table1", strCriteria)
0
 

Author Closing Comment

by:giswest
ID: 37747838
Thanks fyed.  That's exactly what I was looking for.

Have a good day.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
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…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

706 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

19 Experts available now in Live!

Get 1:1 Help Now