Solved

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

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
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…

776 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