Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2009
    Posts
    3

    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].

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Format? Have you put that criteria in a format property?

    If the query runs ok, then the chart should just be looking at the query and not have any criteria as such.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Jul 2009
    Posts
    3
    Thanks,
    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
    WHERE Soldrec.Period=[forms]![Soldperiod]![Text13]
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •