Results 1 to 9 of 9
  1. #1
    George is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    295

    Query based on attachment field


    Good Day All,

    I would like to know what criteria is used to return records based on a field with data type attachment.

    I am using "IsNull" and "IsEmpty" but neither of these work.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Bing: query attachment field is empty

    This has couple suggestions http://stackoverflow.com/questions/2...-not-in-access
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    George is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    295
    Hi June7, I do not understand your response. query attachment field in empty.

    I am making a query on a table which has an attachment field and some records in the field contains attachments. I want to know how to write the criteria that would return these record containing the attachments.

    I tried " not isEmpty" and " Not isNull" with no luck.

    Are there other criteria that can be used?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I searched web with Bing on those keywords. You could try Google.

    Did you review the referenced link?

    An attachment field is a multi-value field and therefore must be queried like a multi-value.

    This quick test in my db works:

    SELECT Umpires.test.FileName, Umpires.UmpID
    FROM Umpires
    WHERE ((Not (Umpires.test.FileName) Is Null));
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    George is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    295
    Thanks,

    I am unfamiliar with bing. Never used it or knew its purpose.

    I did checked the link but it gave the explanation using VBA code. I was looking for a way of simply writing the criteria in the criteria section of the Query window.

    I never used or gave thought to a mult-value fields so this will be my first experience. I would try to understand the code you have sent and let you know when I have succeeded.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    George is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    295
    Thank,

    This would make good reading.

  8. #8
    George is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    295
    Thank for your information but for the forum let be say that a quick solution which works is : Is Null

  9. #9
    George is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    295
    This is an externally helpful link:

    https://support.office.microsoft.com...__toc262850673

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. Replies: 16
    Last Post: 04-30-2012, 07:12 AM
  5. Populating attachment field based on text box
    By justinwright in forum Forms
    Replies: 16
    Last Post: 09-22-2010, 08:38 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