?
Solved

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

Posted on 2012-03-21
2
Medium Priority
?
330 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 48

Accepted Solution

by:
Dale Fye earned 2000 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Suggested Courses

765 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