Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18

Just-for-Curiosity DMAX() Question

  1. #16
    ridders52's Avatar
    ridders52 is offline Voodoo Is Practised
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    2,389
    Here's a similar situation:
    Filter criteria that work in a query will need to be modified to include delimiters where a SQL statement is used instead. Other changes may be needed e.g. if dates are being filtered, the SQL statement needs to use mm/dd/yyyy format even though that isn't necessary in a query



    So if I post a question stating that I have a query that works but when converted to SQL it doesn't, it would be perfectly reasonable to expect forum members to ask me to post the SQL.

    Anyway I'll leave you to it... Good luck
    Colin (Mendip Data Systems), Website, email
    If this has helped, please click the star button and leave a comment

  2. #17
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    18,736
    Quote Originally Posted by Ellpee View Post
    Thanks for the snark. When I ask "Is it Tuesday," I don't expect to be asked to post my calendar algorithm. All I asked in the first place was, does anyone know of any Microsoft limitations that would cause DMAX() to produce a faulty result. If answering that requires posting a bunch of code, much less uploading my client's entire database, guess I'm fishing in the wrong pond.
    The first two responses directly addressed your question about limitations. I as well as others interpreted "why DMAX gave me a bogus answer" as a separate question, which we were trying to answer. The obvious way to do that is investigate why one method worked and the other didn't. You do that by comparing them, which is why we asked for the exact syntax used in the DMax() and the recordset SQL. You've later said they were identical, but your original post stated they used "basically the same select criteria". That leaves some wiggle room that there may have been a difference that you didn't think was material but could have caused the different result. I guess we'll never know since you don't want to post it.
    Paul (wino moderator)
    MS Access MVP
    www.BaldyWeb.com

  3. #18
    ridders52's Avatar
    ridders52 is offline Voodoo Is Practised
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    2,389
    Final comment from me. I've just tested running the DMax function on various fields including dates in a large table of 2.6 million records.
    This was in response to a question in another thread http://www.accessforums.net/showthread.php?t=74027

    In every test, the DMax function gave the correct results. Similarly with DMin
    Colin (Mendip Data Systems), Website, email
    If this has helped, please click the star button and leave a comment

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Just a "Curiosity" Question
    By MaineLady in forum Access
    Replies: 2
    Last Post: 02-28-2015, 12:12 PM
  2. DMAx Question for Report - DMax <= Dtae
    By crimedog in forum Access
    Replies: 8
    Last Post: 12-29-2014, 08:31 PM
  3. Dmax
    By Jrw76 in forum Forms
    Replies: 6
    Last Post: 01-09-2014, 01:47 PM
  4. DMax Question
    By The Professor in forum Forms
    Replies: 3
    Last Post: 02-05-2013, 07:30 AM
  5. Replies: 6
    Last Post: 07-24-2012, 02:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Tech Forums: Microsoft Office Forums