Results 1 to 10 of 10
  1. #1
    Join Date
    Apr 2014
    Posts
    12

    Unanswered: Adding subforms on a main form

    Hi All,

    Im quite new to access , i have created a main form as attached where we have several buttons on the left and a subform in the middle on its right.
    I want to display a subform based on the button click, i have already created all the forms , but i dont know how to display the subform individually in the main form by clicking on the button on the right, i really have to know it because of a project which im planning to do.

    Your help will be highly appreciated


    Thanks for your prompt answer guys as i'm really in great trouble

    Ludovic
    Attached Thumbnails Attached Thumbnails Subform Issue.jpg  

  2. #2
    Join Date
    Mar 2009
    Posts
    5,441
    Provided Answers: 14
    If want you're looking to is to dynamically load a subform in the parent (main) form at runtime, you can use the SourceObject propery of the control of type subform/subreport that acts as a container for the subform:
    Code:
    Me.SubFormControlName.SourceObject = "SubFormName"
    Have a nice day!

  3. #3
    Join Date
    Apr 2014
    Posts
    12

    Adding subforms on a main form

    it does not function, can you please check it as atached, it functions only for the first button, the remaining got an error message
    Can you please check it please

    Ludovic
    Attached Files Attached Files

  4. #4
    Join Date
    Mar 2009
    Posts
    5,441
    Provided Answers: 14
    1. What does not function? If you receive an error message what is it (code + description)?
    2. What's the name of the form where the problem occurs?
    Have a nice day!

  5. #5
    Join Date
    Apr 2014
    Posts
    12

    Adding subforms on a main form

    Hi

    Thanks for your reply sir,
    i created this form without any code as you can see, and all the form in the subform in the left are the same except the label in the top is different, because i have not yet add the proper button and label in each of th form,
    Would you please Sir, to modify it for me so that i can deeply understand the container and the parent and the form to be created, then i can work it in my level,
    Because i badly need it and i dont know how to input the code and let it works

    I want that the subform appears in the main form when i clicked the button on the left,

    Thanks for your great help, i think your help wll really relieves me

    Please

    Ludovic

  6. #6
    Join Date
    Mar 2009
    Posts
    5,441
    Provided Answers: 14
    You did not answer my questions. What's the name of the form where the error occurs and what's the error (error code + description).
    Have a nice day!

  7. #7
    Join Date
    Apr 2014
    Posts
    12

    Adding subforms on a main form

    You did not answer my questions. What's the name of the form where the error occurs and what's the error (error code + description).
    __________________
    Have a nice day!


    Hi Sinndho,

    Im sorry for the lateness, im still at work, and im suppose to just present them the project despite im not still understanding how to do such.when you click on the button development, you will see theres a code in the property, but the remaining button at the left i have not codify it because it gives me an error, i was supppose to input the same code but a different form name, but this does not work, can you please try the code and bring whatever form on the main form,
    because i have already created a lot of form of the same model, but only the top label change.

    Can you please sir try it for me as i really dont know how to change the subform while clicking on different button

    Thx for your kind help

    Ludovic

  8. #8
    Join Date
    Mar 2009
    Posts
    5,441
    Provided Answers: 14
    It's not among my intentions to begin to explore your project, just to find what's wrong with it. If you do not bother the tell me in a precise way what's wrong and where, I won't be able to help you any further, sorry !
    Have a nice day!

  9. #9
    Join Date
    Apr 2014
    Posts
    12

    Adding subforms on a main form

    It's not among my intentions to begin to explore your project, just to find what's wrong with it. If you do not bother the tell me in a precise way what's wrong and where, I won't be able to help you any further, sorry !
    __________________
    Have a nice day!

    HI Sinndho,

    Thanks for your prompt reply, i attached the file, when you click the development button, nothing happens, but when you clicked on figures button, it displays an error,
    I stop to encode it as from here for other buttons, as it will give me the same mistake error

    Can you please look into as i dont know how to proceed

    Thanks

    Ludovic

  10. #10
    Join Date
    Mar 2009
    Posts
    5,441
    Provided Answers: 14
    What in "What's the name of the form" don't you understand?
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •