Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Feb 2006
    Posts
    504
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Print current data report (2003)

    Hi,

    I build a report to list all the data that current on the form, but I have problem to print a report that only shows current data. Everytime I print the report and it have 100 pages since I have 100 entries in the database. How can I print the report with current data that on the open form?

    Thanks in advance.

    Regards

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Print current data report (2003)

    You have two options.
    1: Build a query that uses the current record identifier as a parameter, and base the report on that query rather than the table.
    2: Open the report with a "Where" clause, that again uses the current record identifier on the form for the where clause. See the thread beginning with <post#=715985 >post 715985 </post#> for more about opening reports with a 'where" clause.
    Regards
    John



  3. #3
    4 Star Lounger
    Join Date
    Feb 2006
    Posts
    504
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print current data report (2003)

    Thanks Hans.

    I would like to try first option, so how can I setup the current record identifier as a parameter in a query?

    Thanks

  4. #4
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Print current data report (2003)

    Firstly open the form, and be clear which field is the primary key. Leave the form open.

    Then create a new query that selects all fields from the table (using the *) then add the primary key field again.

    On the criteria line, under the key field, right click and choose Build.

    Double click the + next to forms, then again next to Loaded forms. You will see the form you want to use listed. click on it, and all its fields will be displayed in the centre column. Double click the key field , and you will see something like this. Click ok, then remove the tick from the "show box" in the column of this key field.
    Final query is shown at the bottom.(except your names will be different)
    Save the query, then use it as the recordsource of the form.
    Attached Images Attached Images
    Regards
    John



Posting Permissions

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