Create Dynamic Report using VBA

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • twinnyfo
    Recognized Expert Moderator Specialist
    • Nov 2011
    • 3653

    #31
    Very strange. It works fine for me without a new instance....

    I have no current explanation.

    Comment

    • lonerjohn
      New Member
      • Jan 2019
      • 23

      #32
      No worries, I'm just happy it works. Now I just have to figure out the calculated control and my week will be set lol

      Comment

      • twinnyfo
        Recognized Expert Moderator Specialist
        • Nov 2011
        • 3653

        #33
        Perfect! I will remove from the code above so others don't experience the same.

        Thanks!

        Comment

        • twinnyfo
          Recognized Expert Moderator Specialist
          • Nov 2011
          • 3653

          #34
          Lines 45-47 above give one such example. However, I presume your issue is a wee bit more complicated....

          Feel free to begin a new thread with such a question. That will be more helpful for others viewing this site.

          Comment

          • lonerjohn
            New Member
            • Jan 2019
            • 23

            #35
            Yeah, it's a lot more complicated, I'll explain it here, and if it's meant for another thread, I can post it again.

            Let me preface this by saying I completely understand and acknowledge that the way this database was built is not efficient. However, my office wants to keep this setup.

            I have a reports form (frmReports2) to generate reports based on information selected by the user. One of the command buttons contains the code you provided above. frmReports2 also contains a multi-value field list box to choose among specific fields to add to the report. All this works fine. My problem, however, is that 9 of the fields contain financial values. If the user selects one or more of these fields (FY1415, FY1516, FY1617, FY1718, FY1819, FY1920, FY2021, FY2122, FY2223) for the report, I need to have a calculated control on the report for each record that will sum up the values of the fields the user chose to populate on the report. So if the user chose to show values of FY1415, FY1516, FY1617 and FY1718, I would need to add those to the report (which is already done) but also add an additional field to calculate the sum of those (in this instance, 4) fields that the user chose.

            Comment

            • twinnyfo
              Recognized Expert Moderator Specialist
              • Nov 2011
              • 3653

              #36
              I am going to specifically ask you to begin a new thread, as I welcome the challenge.

              However, I think the answer is as simple as creating a field that simply sums the desired field and placing it in the Report Footer--all of which, I believe, can be done using CreatReportCont rol. Then, it's just an issue of adjusting its location.

              I encourage you to take a stab at it and post your results: success here; problems in a new thread.

              Comment

              • lonerjohn
                New Member
                • Jan 2019
                • 23

                #37
                My problem is I'm not really advanced with Access. I've taught myself what I know so far. I'm inheriting this project in my new office from someone else. I wouldn't even really know where to begin. I'll post it in a new thread, just in case you do accept the challenge.

                Comment

                • NeoPa
                  Recognized Expert Moderator MVP
                  • Oct 2006
                  • 32633

                  #38
                  I've moved a bunch of posts about a new question into a separate thread (Dynamic Report).

                  It is never acceptable to post questions within existing threads. If ever you see one - please report it and avoid responding until after it's either been reposted or moved. If it's important the member will repost properly.

                  Comment

                  Working...