View Full Version : problem to show query field in a textbox report


blues66
09-26-2009, 12:42 AM
Hello,

I've a query [qry_sales], showing the Turn Over [Sum of Expr4] value for different periods [Expr3] and per different [product_category].

I've then created a report with the purpose to show month by month the Turn Over for each Product Category.

I was trying to use this query applying it in the textbox control source :

=(SELECT [Sum Of Expr4] FROM [qry_sales] WHERE [Expr3]="2009_01" AND [product_category]="Category1")

but unsuccesfully. I've in the text box "#Name?"

Then I tried with DLookup :

=Dlookup("Sum Of Expr4" ,"[qry_sales]","[Expr3]='2010_01' And [product_category]='Category1')

but in this case I've syntax error...


Thanks a lot for the help

khawar
09-26-2009, 12:54 AM
try this code

=Dlookup("Sum Of Expr4" ,"[qry_sales]","[Expr3]='2010_01' And [product_category]='Category1'")

blues66
09-26-2009, 03:18 AM
I solved the problem by DLookup replacement of the "," with ";" .