Results 1 to 3 of 3

Thread: form to report

  1. #1
    Join Date
    Jan 2010

    Unanswered: form to report

    I have a form with a listbox and 2 graphs. When an item is selected on the
    listbox, the chart displays the appropriate informatiom. But when the
    "preview report" button is selcted at the bottom, the report displays graphs
    for ALL items in the listbox...not the one selected. I am missing passing
    something to the report but I don't know what.

    Here is the code behind the button:

    Private Sub Command20_Click()
    Dim stDocName As String

    stDocName = "rptTrend_HF"
    DoCmd.OpenReport stDocName, acPreview

    End Sub

  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    You have to filter it based on what record the form is currently on. Look up "parameterized form"
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Jan 2010
    Thanks teddy...

    Filter what? The query the chart on the report is based on?

Posting Permissions

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