Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    MTSPEER is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    283
    DELETE *
    FROM TRR


    WHERE TRR.TransactionDate Not In (SELECT DMax("TransactionDate","TRR","HICN='" & [HICN] & "'") AS MaxOfField2
    FROM TRR);

  2. #17
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Hmmm...

    Nothing stands out there. You don't have any blanks, nulls, or odd characters in the HICN field, do you?

    I know that you said that it is sensitive data you cannot post. Are you are able to recreate the situation with the simple example we were working on?
    If not, I am afraid that there isn't much more I can do without seeing the database and/or data.

  3. #18
    MTSPEER is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    283
    I ran the trim function on both fields to make sure there are no spaces. But an example is like this:

    Field1 Field2
    6851851D 20170508
    6851851D 20170125

  4. #19
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    I entered those two records into the database, and ran the query code we came up with in post #7, and it correctly deleted the record with the 20170125 value.
    Does it not do that for you, if you try it in our example database?

  5. #20
    MTSPEER is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    283
    Yea I have no idea why. My mind is blown.I don't understand. I changed the field to be a number field also.

  6. #21
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    I suspect some sort of data issue, but cannot really say without seeing the actual database.

  7. #22
    MTSPEER is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    283
    Should I change it from being a long integer? But im sorry you have helped so much. Thank you

  8. #23
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Sure. Maybe try Single or Double.

    If that does not help it, what you might want to try doing is to export the Table and Query to a new database, and then delete all the data from the Table. Then try to set-up some records which resemble the format of your actual data, but don't give anything anyway. If that issue still exists when you try the query, then you can upload this "dummy data" database here for us to take a look at.

    I cannot download it from my current location (corporate security policies), but can take a look at it tonight when I am home.

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

Similar Threads

  1. Replies: 2
    Last Post: 04-05-2015, 12:23 PM
  2. Helo with removing duplicate values in a query
    By David Sabot in forum Queries
    Replies: 1
    Last Post: 04-22-2013, 12:26 PM
  3. delete query produce #deleted in all deleted values
    By learning_graccess in forum Queries
    Replies: 2
    Last Post: 03-31-2012, 07:20 AM
  4. Smallest in group
    By pvanryzin in forum Queries
    Replies: 3
    Last Post: 08-17-2009, 09:42 AM
  5. Removing the delete prompt.
    By botts121 in forum Programming
    Replies: 4
    Last Post: 06-26-2009, 11:45 AM

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