Results 1 to 3 of 3
  1. #1
    incipientclarity is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    7

    Create Subform with VBA or Macro

    Hi everyone,



    I've designed a form that contains a subform. The subform displays a report that is generated based on some inputs from the original form. My issue now is that when I load the original form, the subform causes lag. I've tried using the Visible property, but since the subform still sits on the original form, even when it is not displayed, it is still executed.


    Is there any way to write a code such that either the subform is "inactive" on loading the original form or the subform is created only after user clicks on a button?

    Thank you!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    A subform/subreport is created by establishing a subform container control on main form. The SourceObject of the container control can be a table, query, form, report. Don't set the SourceObject property in design view. Use code to set the property.

    You are showing a report on form?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    incipientclarity is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    7
    Actually I got it to work. Turns out my code was wrong.

    Thanks for your suggestions! Inspired me to look at the SourceObject property.

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

Similar Threads

  1. Create a Macro to run backup of database
    By Harley Guy in forum Macros
    Replies: 7
    Last Post: 10-02-2014, 12:33 PM
  2. Help: Create Macro: Echo Action
    By dododo in forum Macros
    Replies: 3
    Last Post: 07-23-2013, 11:41 AM
  3. Assist to create Data Macro
    By rkalapura in forum Programming
    Replies: 3
    Last Post: 07-30-2011, 11:12 AM
  4. Can't create a simple macro......
    By Sarge, USMC in forum Access
    Replies: 1
    Last Post: 01-05-2011, 11:48 AM
  5. how to create a macro or code to...
    By Eaglezinha in forum Access
    Replies: 1
    Last Post: 10-20-2008, 04:01 PM

Tags for this Thread

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