problem to show query field in a textbox report

blues66

Registered User.
Local time
Today, 15:03
Joined
Nov 14, 2008
Messages
12
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
 
try this code

=Dlookup("Sum Of Expr4" ,"[qry_sales]","[Expr3]='2010_01' And [product_category]='Category1'")
 
I solved the problem by DLookup replacement of the "," with ";" .
 

Users who are viewing this thread

Back
Top Bottom