Multiple criteria query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi.

I cant get this to work.
So I think I need some professional help here. :)

SELECT [3ExpPL].PL, [3ExpPL].Article, [3ExpPL].Size,
DLookUp("[4EAN]","[4EAN]","[ArticleNumber] = [Article]" And "[Size] =
[Size]") AS EAN
FROM 3ExpPL;

I´m supposed to get the EAN for each article/size (ofcourse different for
each article/size), but I only get the first value in the table EAN for all
records.

They are all Text.

Can anyone help me with this?
I'm not that super when it comes to querys, so......

BR
Claes
 
Hi there, why do this as a dlookup instead of just using a select query with
2 tables. You could try something like

SELECT [3expPL].PL, [3expPL].Article, [3expPL].Size, [4EAN].[4Ean] AS EAN
FROM 4EAN RIGHT JOIN 3expPL ON ([4EAN].Size = [3expPL].Size) AND
([4EAN].Articlenumber = [3expPL].Article);

This might not be exact SQL but I am sure you will get the idea

Hth

Stu
 
Back
Top