Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954

    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, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  2. #17
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    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 2007-2019
    www.BaldyWeb.com

  3. #18
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    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 https://www.accessforums.net/showthread.php?t=74027

    In every test, the DMax function gave the correct results. Similarly with DMin
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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, 01:12 PM
  2. DMAx Question for Report - DMax <= Dtae
    By crimedog in forum Access
    Replies: 8
    Last Post: 12-29-2014, 09:31 PM
  3. Dmax
    By Jrw76 in forum Forms
    Replies: 6
    Last Post: 01-09-2014, 02:47 PM
  4. DMax Question
    By The Professor in forum Forms
    Replies: 3
    Last Post: 02-05-2013, 08:30 AM
  5. Replies: 6
    Last Post: 07-24-2012, 03: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
  •  
Other Forums: Microsoft Office Forums