Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2004
    Posts
    2

    Unanswered: Printing the result of SQL "select" statement WITH Paramenter to a report

    I am wriiting a Access 97 application. I need to print the result of SQL "select" statement on a report.

    e.g.
    for the table:

    p_code | p_year | p_month | p_price
    A01 | 2001 | 1 | 100.00
    A01 | 2001 | 2 | 150.00
    A02 | 2000 | 1 | 1200.00
    A02 | 2000 | 2 | 1100.00
    A02 | 2000 | 3 | 1700.00

    Using the SQL Statement:

    SELECT p_year, p_month, p_price
    FROM [product]
    WHERE ((( p_year)=[yr]) AND (( p_month)>=1 And ( p_month)<=[mn]) AND (( p_Codeid)=[code]))
    ORDER BY p_year, p_month;


    WHEREAS the user can
    enter the parameters [code],[yr] and [mn] from keyboard
    to specify the code(s), years and months for printing the report.

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Lightbulb

    Make the parameter Query you want, make a report, adjust its RecordSource to be your created query, put required fields on the report and run it.

Posting Permissions

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