Results 1 to 4 of 4
  1. #1
    jo15765's Avatar
    jo15765 is offline Expert
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2010
    Location
    6 Feet Under
    Posts
    670

    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


    Code:
    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 online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    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
    Location
    London
    Posts
    1,051
    Which two slight changes?


    Sent from my iPhone using Tapatalk

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    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 2007-2019
    www.BaldyWeb.com

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, 07:28 AM
  2. Yes/No Field - convert Yes to Text On Report
    By mjsearcy in forum Access
    Replies: 2
    Last Post: 03-15-2015, 12:53 PM
  3. convert report view to print preview
    By DarrenUD in forum Reports
    Replies: 3
    Last Post: 03-19-2013, 12:21 AM
  4. Convert yes/no to text in Report
    By csland in forum Reports
    Replies: 7
    Last Post: 08-19-2011, 11:18 AM
  5. Convert form to a report
    By Desstro in forum Reports
    Replies: 5
    Last Post: 09-16-2010, 12:18 PM

Posting Permissions

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