Report Help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • edunker
    New Member
    • Dec 2015
    • 14

    Report Help

    I have a report that is based off a table that has many different fields on it and I have a form that the user can choose which fields they want to display. Right now if you choose more then the width of the report, it just puts the extras behind the other ones and not on to a second sheet. Is there away to have it do more then one sheet if necessary?

    Thanks
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    We need a little more information about how you are adding your extra fields.

    In the meantime, you might find the following link useful - I think this is what you are attempting to accomplish:
    How to programmaticall y create a new column in an Access report

    You may find this article of some interest too:
    Create Dynamic Report using VBA

    Oh, I should mention, in the Microsoft link, the DAO library reference is set by default in newer versions of Access - if you are using Acc2010 or newer for sure... not sure about ACC2007 - we skipped that version in the lab!
    Last edited by zmbd; Jan 4 '16, 10:01 PM.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32656

      #3
      I would start with the largest number of TextBox controls that you think you might need, but set them all up as hidden (.Visible = False).

      Determine from the stationery the printer is set to use, or just assume the default, which is A4 in The UK, Letter in The States and I know not elsewhere, how much horizontal space is available. When you know that then add the fields into the controls as necessary and assign widths to each however you do that, then align them horizontally across the page until it no longer fits in the space available. At that point increase the height of the (.Detail) section and add another row of controls. Keep doing this until you have included all the fields selected.

      NB. Each control you want to include must be set as visible (.Visible = True).

      Comment

      Working...