Results 1 to 7 of 7
  1. #1
    bilalo is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    107

    Access 2016 Attachment field weird behavior

    I have a table "Items" with the following attributes: ItemID, price, and a picture (attachment)
    I added some records, the attachment field works perfectly, then I deleted all records and then I compacted and repaired the database
    The problem is now if I try to add a new item, the attachment is automatically filled with one of the previous attachments.


    That is really weird behavior for attachments. Did anyone face the same issue with MS Access 2016?

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I guess this is another reason why the general consensus is you shouldn't store attachments in Access tables. Better to store the path to the file and make use of that instead. IIRC, there is a system table where you might find that these objects are being kept. Perhaps it is re-populating your field with those objects. Not sure that the usual responders here will know because I don't think any of them/us use such fields as a rule.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    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

  4. #4
    bilalo is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    107
    It seems that this behavior only occurs when I delete the records from a form using DoCmd.RunSQL, because when I opened the table and deleted the records manually and then inserted new records, the new records do not have an attachment.

  5. #5
    bilalo is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    107
    Yes I think MS Access is storing a copy of my attachments in a system table.

  6. #6
    bilalo is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    107
    Quote Originally Posted by Micron View Post
    I guess this is another reason why the general consensus is you shouldn't store attachments in Access tables. Better to store the path to the file and make use of that instead. IIRC, there is a system table where you might find that these objects are being kept. Perhaps it is re-populating your field with those objects. Not sure that the usual responders here will know because I don't think any of them/us use such fields as a rule.
    Yes I think MS Access is storing a copy of my attachments in a system table.
    It seems that this behavior only occurs when I delete the records from a form using DoCmd.RunSQL, because when I opened the table and deleted the records manually and then inserted new records, the new records do not have an attachment.

  7. #7
    bilalo is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    107
    No, a different scenario.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Very weird behavior on form
    By Dave14867 in forum Forms
    Replies: 4
    Last Post: 01-21-2021, 03:15 AM
  2. Weird print issue arround attachment field
    By irish634 in forum Access
    Replies: 6
    Last Post: 06-13-2019, 02:32 PM
  3. Replies: 2
    Last Post: 11-13-2016, 08:15 AM
  4. Weird Behavior on Time
    By wrayman in forum Queries
    Replies: 4
    Last Post: 10-05-2016, 05:05 PM
  5. Weird behavior of report on excel export
    By Romio in forum Reports
    Replies: 1
    Last Post: 12-15-2015, 12:52 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