How to specify infomation in a report using VBA...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ricardo de Mila
    New Member
    • Jan 2011
    • 41

    How to specify infomation in a report using VBA...

    I want to have a specific set of registers to be showed in a report, but if I change the filter before the report is oppened, a error will ocurr and if I change the filter afterwards, the file has already been printed.
    What is the way to solve that?

    Best Regards
    Ricardo de Milano
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32661

    #2
    The DoCmd.OpenRepor t() function (which you use to open reports) has a parameter (WhereCondition) that allows you to specify filtering information for the particular instance of that report. That means it won't change the design of the report itself, just apply that filtering as and when it runs this particular line of code.

    Comment

    • Ricardo de Mila
      New Member
      • Jan 2011
      • 41

      #3
      Dear Mr. NeoPa...
      Thank you very very much for your answer. I haven't tested it yet, but the answer is so clear that I don't believe I will have problems.
      Thank you very much.
      Ricardo de Milano

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32661

        #4
        You're very welcome Ricardo :-)

        Comment

        Working...