Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    May 2002
    Location
    Jerusalem, Israel
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Print Parameter Value on a Report (Access 2000)

    Hi.

    I have a report that shows 2 graphs - one without a date range (straight from a query) and the other with a date range, which you define via a parameter value from a different query. I would like the date you enter into the parameter value dialog box to appear on the report (so the report shows the date range). This parameter value is being generated from here:

    [_yk_qry_Countries_DateRange_All]![DateCreated] where the DateCreated field has a criteria of >[Enter Date Created]

    MS Access Help says to create a text box in the header section of the report and to enter the parameter value into the Control Source field (eg: [Enter Date Created]). This only gave me a #name error.

    Any ideas on how I can get the parameter value to appear on the report?

    Thanks,

    JoeK

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Print Parameter Value on a Report (Access 2000)

    You can use the method from the Access help for a parameter of the report's record source. Your parameter, however, belongs to the row source of the graph, not to the record source of the report. The solution is to create a form frmParameter with a text box txtDate in which the user can enter the date. Set the Format property of the text box to Medium Date or another date format.
    Change the criteria in the query to >[Forms]![frmParameter]![txtDate]
    Set the control source of the text box on the report to =[Forms]![frmParameter]![txtDate]
    You should open the report from the form, for example by clicking on a command button - you can use the Command Button Wizard to create the button and the associated code.

  3. #3
    2 Star Lounger
    Join Date
    May 2002
    Location
    Jerusalem, Israel
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print Parameter Value on a Report (Access 2000

    Perfect! Works a charm.

    Thanks, Hans.

Posting Permissions

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