Report generated but prompts for parameter when printing

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • teddysnips@hotmail.com

    Report generated but prompts for parameter when printing

    I have been asked to look at an Access application. It generates a
    report successfully, so that you can see it on the screen with no
    errors.

    However, when you try to print it, the prompt dialog for missing
    parameter is displayed.

    Anyone any thoughts?

    Sorry it's rather sort on detail, but I've been passed the details of
    the problem by someone else. I'm expected to sort the problem on a
    site visit and I don't know if I'll have Internet access on-site.

    TIA

    Edward

  • Arvin Meyer [MVP]

    #2
    Re: Report generated but prompts for parameter when printing

    Unfortunately, without much more information, the problem could be in many
    different places. Here are a couple of the more likely ones. First run the
    query and see if you get prompt. Then look in the Sorting and Grouping
    dialog and see if there are any fields which are no longer in the data set.
    --
    Arvin Meyer, MCP, MVP
    Database Consulting, Business Computer Solutions in Orlando, FL MCP, MVP, Networking, Computers, consulting

    Microsoft Access FAQ Site. This website is designed to help Microsoft Access developers find answers to some common development issues. Plenty of code samples, wizards, tips, bug listing, and of course links. If you can't find the answers here, make sure you visit one of the several Access newsgroups. The site is managed by Dev Ashish.

    Database Consulting, MVP, consulting


    <teddysnips@hot mail.comwrote in message
    news:1160563563 .754481.304680@ e3g2000cwe.goog legroups.com...
    >I have been asked to look at an Access application. It generates a
    report successfully, so that you can see it on the screen with no
    errors.
    >
    However, when you try to print it, the prompt dialog for missing
    parameter is displayed.
    >
    Anyone any thoughts?
    >
    Sorry it's rather sort on detail, but I've been passed the details of
    the problem by someone else. I'm expected to sort the problem on a
    site visit and I don't know if I'll have Internet access on-site.
    >
    TIA
    >
    Edward
    >

    Comment

    • BerkshireGuy

      #3
      Re: Report generated but prompts for parameter when printing

      Wouldn't those conditions hold true even in preview mode?

      How do you print the report? Via the print icon in Access or did you
      code an option to print or preview? If so, perhaps there is a bad
      where clause being passed when you choose print?

      -Brian


      Arvin Meyer [MVP] wrote:
      Unfortunately, without much more information, the problem could be in many
      different places. Here are a couple of the more likely ones. First run the
      query and see if you get prompt. Then look in the Sorting and Grouping
      dialog and see if there are any fields which are no longer in the data set.
      --
      Arvin Meyer, MCP, MVP
      Database Consulting, Business Computer Solutions in Orlando, FL MCP, MVP, Networking, Computers, consulting

      Microsoft Access FAQ Site. This website is designed to help Microsoft Access developers find answers to some common development issues. Plenty of code samples, wizards, tips, bug listing, and of course links. If you can't find the answers here, make sure you visit one of the several Access newsgroups. The site is managed by Dev Ashish.

      Database Consulting, MVP, consulting

      >
      <teddysnips@hot mail.comwrote in message
      news:1160563563 .754481.304680@ e3g2000cwe.goog legroups.com...
      I have been asked to look at an Access application. It generates a
      report successfully, so that you can see it on the screen with no
      errors.

      However, when you try to print it, the prompt dialog for missing
      parameter is displayed.

      Anyone any thoughts?

      Sorry it's rather sort on detail, but I've been passed the details of
      the problem by someone else. I'm expected to sort the problem on a
      site visit and I don't know if I'll have Internet access on-site.

      TIA

      Edward

      Comment

      • teddysnips@hotmail.com

        #4
        Re: Report generated but prompts for parameter when printing


        BerkshireGuy wrote:
        Wouldn't those conditions hold true even in preview mode?
        >
        How do you print the report? Via the print icon in Access or did you
        code an option to print or preview? If so, perhaps there is a bad
        where clause being passed when you choose print?
        >
        -Brian
        That's what I thought. Obviously I'll take a look at Arvin's
        suggestions, but my thinking (bearing in mind that I *didn't* write the
        app., and in fact have never seen it!) is that if it gets as far as
        generating the report on screen it's unlikely to be a problem with the
        underlying query.

        I'll post again when I've figured it out, or have more information.

        Edward

        Comment

        • paii, Ron

          #5
          Re: Report generated but prompts for parameter when printing

          Does the report contain a graph?

          I have one with a parameter in the graph's source query that accepts my
          input before the preview and repeats the prompt when printed.

          <teddysnips@hot mail.comwrote in message
          news:1160563563 .754481.304680@ e3g2000cwe.goog legroups.com...
          I have been asked to look at an Access application. It generates a
          report successfully, so that you can see it on the screen with no
          errors.
          >
          However, when you try to print it, the prompt dialog for missing
          parameter is displayed.
          >
          Anyone any thoughts?
          >
          Sorry it's rather sort on detail, but I've been passed the details of
          the problem by someone else. I'm expected to sort the problem on a
          site visit and I don't know if I'll have Internet access on-site.
          >
          TIA
          >
          Edward
          >

          Comment

          • teddysnips@hotmail.com

            #6
            Re: Report generated but prompts for parameter when printing

            Ignore what I wrote - the person who relayed the problem details was
            misled.

            The problem comes, as I suspected, when the report is actually being
            generated on-screen. As Brian suggested, the report is being "Printed"
            via a button, which simply opens the report.

            The report contains a number of sub-reports, one of which contains a
            text box with the following ControlSource:

            =(Str([Quantity]))+(" no. "+[CutOutDescripti on])

            When opening the report, the parameter would prompt for "Str"

            This led me to think that there was either a References problem or a
            Compilation problem. The References checked out, but the program
            didn't compile. It barfed in the following sub:

            Private Sub Text28_AfterUpd ate()

            Dim stDocName As String

            stDocName = "qryEstimateTot als"
            DoCmd.Requery stDocName, acNormal, acEdit

            End Sub

            The offending line is:

            DoCmd.Requery stDocName, acNormal, acEdit

            and the error is:

            "Wrong number of arguments or invalid property assignment"

            If I amend the line to:

            DoCmd.Requery stDocName

            all is well - the application compiles and doesn't prompt for a
            parameter called Str!

            What I want to know is:

            How did anyone ever get the damn thing to work in the first place?
            Please do bear in mind that I DID NOT write this - for a start, I never
            leave my controls with their default names (e.g. Text28) And what is
            the purpose, do you suppose, of the line

            DoCmd.Requery stDocName, acNormal, acEdit

            Thanks

            Edward

            Comment

            Working...