Results 1 to 2 of 2
  1. #1
    orange's Avatar
    orange is offline Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,715

    Query an Attachment field

    I am posting a sample database that shows how to query an attachment field. This is a simple database but was created after assisting a poster who could not find an example. In fact, trying to find sample vba code and or queries to query an attachment field proved to be fruitless.



    I found samples of how to add or delete an attachment from a record; and how to use a form to add data to the attachment field in a table. Here is a youtube video for that.

    In the demo database, there is a table called Table1. It has 3 fields.
    Code:
    table_name  field_name    field_description    ordinal_position    data_type    length    default
    Table1        ID           sample Id PK                       0                    Long    4    
    Table1        mname    first name (fictitious data)    1                    Text    255    
    Table1        Att           demo attachments              2                       4
    The table has 4 records.
    Record ID 1 and 3 have attachments. Records 2 and 4 do not. Record Id 3 has 3 attachments.

    The database has queries to show:
    -Which Records Have Attachments
    -Which Records Do Not Have Attachments
    -How any Attachments Are Associated with a Record That Has Attachments
    -Which Records Have more Than 2 Attachments

    There is a form frm_Table1 that was used to add the attachments to the records in the table.

    This is a demo just to show how to query a table that has attachments in Attachment type field.
    Attached Files Attached Files
    Last edited by orange; 02-06-2016 at 08:20 PM. Reason: spelling

  2. #2
    George is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    295
    Thanks Orange. This video is useful.

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

Similar Threads

  1. Replies: 3
    Last Post: 10-13-2014, 05:48 PM
  2. Replies: 1
    Last Post: 09-04-2014, 11:10 AM
  3. Replies: 2
    Last Post: 08-11-2014, 12:57 PM
  4. Using Update Query with Attachment Field
    By Emily.G in forum Queries
    Replies: 4
    Last Post: 08-17-2012, 07:37 AM
  5. Replies: 16
    Last Post: 04-30-2012, 07:12 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