Hi,
I'm trying to do what is usually a simple task:
I've three tables - images,keywords, and keylink.
[Images] hold the details of a photograph in a stock library.
[Keywords] holds a list of keywords that are available to be related to the images in [images]
[keylink] consists of [imageid] and [keywordid] and is used as a junction table to related multiple keywords with an image.
In access, I've created this SQL string:
SELECT images.imageID, images.fileName, keywords.keyword, keywords.keyword
FROM keywords INNER JOIN (images INNER JOIN keyLink ON images.imageID = keyLink.imageID) ON keywords.keywordID = keyLink.keywordID
WHERE (((keywords.keyword)="post" And (keywords.keyword)="box");
Which is designed to display [imageid] and [filename] from the table [images] where the image is linked to both the words "post" and "box".
This string works fine when I use just one search word, but returns empty when I try more than one, as above.
Anyone any idea where I'm going wrong?
Many thanks
I'm trying to do what is usually a simple task:
I've three tables - images,keywords, and keylink.
[Images] hold the details of a photograph in a stock library.
[Keywords] holds a list of keywords that are available to be related to the images in [images]
[keylink] consists of [imageid] and [keywordid] and is used as a junction table to related multiple keywords with an image.
In access, I've created this SQL string:
SELECT images.imageID, images.fileName, keywords.keyword, keywords.keyword
FROM keywords INNER JOIN (images INNER JOIN keyLink ON images.imageID = keyLink.imageID) ON keywords.keywordID = keyLink.keywordID
WHERE (((keywords.keyword)="post" And (keywords.keyword)="box");
Which is designed to display [imageid] and [filename] from the table [images] where the image is linked to both the words "post" and "box".
This string works fine when I use just one search word, but returns empty when I try more than one, as above.
Anyone any idea where I'm going wrong?
Many thanks