Unanswered: Passing parameter to form that produce a graph
I'm trying to put toghether a chart that is based on a query. The queries gets a date criteria from a form.
When I go to run the query I open the form enter the data and the query runs OK but when I go to run the chart report a get a message saying the database engine doesn not recognize the format [forms]![select]![period].
I changed the code to include the input period parameter but now I get the following error:
This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables. (Error 3071)
My query sql look like this :
PARAMETERS [Forms]![Soldperiod]![Text13] Text ( 255 );
SELECT SOldrec.Product_code AS EXPR1, Shop.Area AS EXPR3, Sum(SOldrec.quantity) AS EXPR2
FROM ((Soldrec INNER JOIN Shop ON Soldrec.Shop_code=Shop.Shop_code) INNER JOIN Area ON Shop.Area=Area.Area_code) INNER JOIN Product ON Product.Product_code=Soldrec.Product_code
GROUP BY Soldrec.Product_code, Shop.Area;
There are 2 forms involved, I have a period the user can select and when he select the button I open another form on which I created a graph(when creating the graph I selected which query must be used