Query Attachments?

Generic

Board Regular
Joined
Dec 6, 2006
Messages
64
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?
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
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
  )
)
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,213,565
Messages
6,114,338
Members
448,570
Latest member
rik81h

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top