Results 1 to 4 of 4

Convert Report To VBA

  1. #1
    jo15765's Avatar
    jo15765 is offline Expert
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2010
    6 Feet Under

    Convert Report To VBA

    I have a report that is set-up and working. I need to make two slight changes to the report, so I was wondering if there was a way to generate VBA of a report? If I hit alt+F11 and look under Microsoft Office Class Objects then look under the report - the only VBA code that is showing is
    Option Compare Database
    I know my next option would be to just design the same report with the changes and save it with a very similar file name and append _A or _B to the end of the filename to differentiate, however I would prefer to go the VBA route if it will not take extensive time to code out the report.

    Is it possible to generate VBA for an already existing access report?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    theres no code needed for a report.
    you CAN filter a report to certain records if needed, so you dont need many reports for the same thing.

    docmd.openreport "report",acPreview, "[id]=" & forms!myForm!cboID

  3. #3
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Which two slight changes?

    Sent from my iPhone using Tapatalk

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Nevada, USA
    You can export to text and import back, but all you need to do is make a copy of the report from the Navigation Pane, then make your changes to the copy (if you really need 2 copies).
    Paul (wino moderator)
    MS Access MVP

Please reply to this thread with any new information or opinions.

Similar Threads

  1. convert a report to HTML using a template
    By danial.a in forum Reports
    Replies: 2
    Last Post: 09-04-2015, 06:28 AM
  2. Yes/No Field - convert Yes to Text On Report
    By mjsearcy in forum Access
    Replies: 2
    Last Post: 03-15-2015, 11:53 AM
  3. convert report view to print preview
    By DarrenUD in forum Reports
    Replies: 3
    Last Post: 03-18-2013, 11:21 PM
  4. Convert yes/no to text in Report
    By csland in forum Reports
    Replies: 7
    Last Post: 08-19-2011, 10:18 AM
  5. Convert form to a report
    By Desstro in forum Reports
    Replies: 5
    Last Post: 09-16-2010, 11:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Tech Forums: Microsoft Office Forums