? SRY Cannot reply to KARLDEWEY ??
1st query
SELECT First(tblartikels.Id) AS ArtID,
IIf([Family],[FamilyName],[ArtikelNaam]) AS Artikel, tblartikels.Indeling,
[tblArtikels.ProductGroep] AS ProdGrID
FROM tblProductgroep RIGHT JOIN (tblFamily RIGHT JOIN tblartikels ON
tblFamily.FamilyID = tblartikels.Family) ON tblProductgroep.Id =
tblartikels.ProductGroep
GROUP BY IIf([Family],[FamilyName],[ArtikelNaam]), tblartikels.Indeling,
[tblArtikels.ProductGroep]
HAVING (((tblartikels.Indeling)="INDOOR") AND
(([tblArtikels.ProductGroep])=1));
2nd query with the checkbox:
SELECT IIf([Family],[FamilyName],[ArtikelNaam]) AS Artikel,
tblartikels.Indeling, [tblArtikels.ProductGroep] AS ProdGrID,
Min(tblartikels.Order) AS MinVanOrder
FROM tblProductgroep RIGHT JOIN (tblFamily RIGHT JOIN tblartikels ON
tblFamily.FamilyID = tblartikels.Family) ON tblProductgroep.Id =
tblartikels.ProductGroep
GROUP BY IIf([Family],[FamilyName],[ArtikelNaam]), tblartikels.Indeling,
[tblArtikels.ProductGroep]
HAVING (((tblartikels.Indeling)="INDOOR") AND
(([tblArtikels.ProductGroep])=1));
Thank U
F
"KARL DEWEY" <(E-Mail Removed)> schreef in bericht
news

28B17F4-7281-4C3D-B943-(E-Mail Removed)...
> Post the SQL of your two queries.
> --
> Build a little, test a little.
>
>
> "Frank De Wael" wrote:
>
>> Hi,
>> I'm successfully grouping an articles table by Category, ProductGroup,
>> and
>> ProductFamily;
>> Since this query is used to select 1 article I needed the articleID to
>> return the 'first' in each group.
>> Now my client doesn't agree to show the first of each group but wants to
>> show another article (wich has a better representative image) in each
>> group.
>> I therefore gave the ArticleTable a CheckBox field so he can choose which
>> article needs to be showed.
>>
>> Adding this checkbox field to my query does result in the correct
>> returned
>> records using 'min' on this checkboxfield but : How can I return this
>> (checked) ArticleID ?
>> note : not all groups will have checked (preferred) articles !!
>> thanks
>> f
>>
>> .
>>