Results 1 to 4 of 4
Like Tree1Likes
  • 1 Post By Generic

Query Attachments?

This is a discussion on Query Attachments? within the Microsoft Access forums, part of the Question Forums category; I am working with Access 2007 attempting to write a simple query that would look through all the records and ...

  1. #1
    Board Regular
    Join Date
    Dec 2006
    Posts
    64

    Default Query Attachments?

    I am working with Access 2007 attempting to write a simple query that would look through all the records and only show those records that have attachments in the record. I can't seem to locate information on how to write the criteria to do this.

    I tried "Is not null" or ">0" no luck. Anyone know how to write this?

  2. #2
    Board Regular
    Join Date
    Jan 2009
    Posts
    865

    Default Re: Query Attachments?

    what is an attachment ? a column name ? I know you said you tried "is not null", but it seems as if that should have worked
    Code:
    select *
    from table1
    where
    (
      (
        table1.column1 is not null
      )
    )

  3. #3
    Board Regular
    Join Date
    Dec 2006
    Posts
    64

    Default Re: Query Attachments?

    Attachments in Access 2007 allow a field of a database to contain files items like, Pictures, Audio Files, PDF's, or any other file type. I notice that when a field contains no attachment the field will contain a paperclip icon and "(0)". When the field contains items the zero would be replaced by the number of items in the field.

    So I am not sure as to how to write a query that would only show records that actually contained items from an attachment field.

  4. #4
    Board Regular
    Join Date
    Dec 2006
    Posts
    64

    Default Re: Query Attachments?

    Should anyone else have this issue, seems the answer is simple. I set up a query to look into the "ATTACHMENT.FileType" field with the following "Is Not Null". This query will only show records that have an attachment of any type.
    jamot1 likes this.

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com