Solved

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

Posted on 2012-03-21
2
322 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

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

Suggested Solutions

Title # Comments Views Activity
Format vertical text in Access 2016 3 33
Sub Reports 8 23
How can I name a sub macro so Shift/F10 would work. 3 22
MS Access Tables Linking 6 42
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…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
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…
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…

896 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