Solved

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

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server functions 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 Ac…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

734 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