SQL form relationship again!

Steven.Foy

Steve
Local time
Today, 08:51
Joined
Jul 15, 2004
Messages
23
Any ideas why this returns a blank screen?

SELECT tblWorkCentremonthlybreakdown.[Work Discipline], Sum(tblWorkCentremonthlybreakdown.[<=1m]) AS [SumOf<=1m], Sum(tblWorkCentremonthlybreakdown.[>1m<=3m]) AS [SumOf>1m<=3m], Sum(tblWorkCentremonthlybreakdown.[>3m<1Y]) AS [SumOf>3m<1Y], Sum(tblWorkCentremonthlybreakdown.[1Y]) AS SumOf1Y, Sum(tblWorkCentremonthlybreakdown.[>1Y]) AS [SumOf>1Y]
FROM tblWorkCentremonthlybreakdown
WHERE (((tblWorkCentremonthlybreakdown.Asset)="Forms![frmWork Discipline]![Combo129WDAssetList] "))
GROUP BY tblWorkCentremonthlybreakdown.[Work Discipline];

Its meant to filter a query by the string found in a combo box on the form frmWorkDiscipline.

Am puzzled!
 
Because you are looking for the Asset field to literally equal "Forms![frmWork Discipline]![Combo129WDAssetList] " and not Forms![frmWork Discipline]![Combo129WDAssetList]
 
if i remove the quotation marks it still doesn;t return any records.

i've done this umpteen times recently...but this one seems to be really stubborn!

Am tearing my hair out!
 
sorted now.....persaverence(or a word spelt like that...ish) paid off!
 

Users who are viewing this thread

Back
Top Bottom