Results 1 to 10 of 10
  1. #1
    3 Star Lounger
    Join Date
    Mar 2009
    Location
    Hong Kong
    Posts
    359
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Is it possible to embed a subform in a continuous form?
    The continuous form contains a list of books.
    Subform 1 is a list of categories assigned to the book.
    Subform 2 is a list of authors for the book.
    When record pointer moves from one book to another, the subforms update the categories and authors accordingly.
    Is it doable in Access 2007?
    Armstrong

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You can't place a subform in the detail section of a continuous form.

    You can place a subform in the form footer (or form header) of a continuous form, and link it to the main form as usual. As the user scrolls through the records of the continuous form, the subform will display the corresponding records.

    Another option is to place the continuous form and the "subforms" side by side in the detail section of an unbound main form. You'd have to link the "subforms" to a control on the continuous form, which can be a bit tricky, but it does work.

  3. #3
    3 Star Lounger
    Join Date
    Mar 2009
    Location
    Hong Kong
    Posts
    359
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='785543' date='21-Jul-2009 20:01']You can't place a subform in the detail section of a continuous form.

    You can place a subform in the form footer (or form header) of a continuous form, and link it to the main form as usual. As the user scrolls through the records of the continuous form, the subform will display the corresponding records.

    Another option is to place the continuous form and the "subforms" side by side in the detail section of an unbound main form. You'd have to link the "subforms" to a control on the continuous form, which can be a bit tricky, but it does work.[/quote]

    Hi Hans,
    Before reading your reply, I've already done the 1st approach you suggested. Yes, my subforms are placed in the header. I will take some time to try out your 2nd approach.
    The reason I raised the question is Access 2007 always issues warning whenever I insert subforms in the header/footer. In addition, Access changes the Default View from Continuous Forms to Single Form automatically. That led me to believe that Access may not support subforms being embedded in the continuous form.
    In fact, the Default View (property) can be manually changed back to Continuous Forms.
    Thanks for your help.
    Armstrong

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Yes, Access changes the default view back to single form if you place a subform anywhere on a continuous form, but it the subform is placed in the form header or footer, you can easily change it back. You can't do that if you place the subform in the detail section.
    This behavior has been the same in all versions of Access as far as I know.

    If you place subforms side by side, the Link Master Fields property of the second subform will look like FirstSubForm!RelevantControl where FirstSubForm is the name of the first subform as a control on the main form, and RelevantControl is the name of the control bound to the field that you want to link to.
    You can't use the builder/wizard to set the Link Master Field property in this situation, you must set it manually.

  5. #5
    3 Star Lounger
    Join Date
    Mar 2009
    Location
    Hong Kong
    Posts
    359
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='785543' date='21-Jul-2009 20:01']Another option is to place the continuous form and the "subforms" side by side in the detail section of an unbound main form. You'd have to link the "subforms" to a control on the continuous form, which can be a bit tricky, but it does work.[/quote]
    Though I'm contented with the header/footer placement (as shown in the screenshot), I'm obsessively intrigued by your side-by-side solution. Alas, forgive my ignorance. I have trouble to understand and implement it. In particular, I have trouble to understand the above quoted paragraph.

    Questions:
    1. Why does it mean by "to place the continuous form and the subforms side by side in the detail section of an unbound main form.
    2. By "unbound main form," does it mean the main form isn't bound to any dataset/recordset?
    3. Would you be exceedingly generous enough to create a sample database to help my troubled learning?

    3 tables
    Table A: BookID, BookTitle
    Table B: BookID, Category
    Table C: BookID, Author
    Both Table B & C are related to Table A by BookID.

    Thanks a lot.

    Armstrong

    Edited: 7/22/2009 Wed 09:47:10 AM HKT
    Q1 should read: What does it mean by "to place the continuous form and the subforms side by side in the detail section of an unbound main form"?
    Sorry for my typo.
    Attached Images Attached Images

  6. #6
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    [quote name='armsys' post='785674' date='22-Jul-2009 10:04']Questions:
    1. Why does it mean by "to place the continuous form and the subforms side by side in the detail section of an unbound main form.
    2. By "unbound main form," does it mean the main form isn't bound to any dataset/recordset?
    3. Would you be exceedingly generous enough to create a sample database to help my troubled learning?[/quote]

    Q2: Yes. In 2007 Create ...Form Design does this for you.
    Q1: to put things side by side, you need a container to hold them. An unbound form does that job.
    But I often do this where the Main container form is not unbound. In the screenshot below, the main form is about Medical Practices. For each practice I want to have multiple communication records, but each of these is about multiple doctors. So in this case I have used the side-by-side solution.
    [attachment=84796:Sidebyside.gif]


    I am always concerned when I do this that people will attach records (at the side) to the wrong master record. So in this case I use the pink/red rectangle to reinforce the current record, and I also display Date/time of the current call is also display at the top of the form on the right.

    Q3. I haven't time at the moment. Can you post your books database? Someone could add a side by side example to that, without having to start again.
    Attached Images Attached Images
    Regards
    John



  7. #7
    3 Star Lounger
    Join Date
    Mar 2009
    Location
    Hong Kong
    Posts
    359
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi John,
    Thanks for your extensive reply. I'm amazed by your sophisticated UI design.
    Armstrong

  8. #8
    3 Star Lounger
    Join Date
    Mar 2009
    Location
    Hong Kong
    Posts
    359
    Thanks
    0
    Thanked 0 Times in 0 Posts
    How could one form contain two forms side-by-side like yours?
    Armstrong

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Open the main form in design view.
    Arrange the database window and the form window so that you can see both.

    Drag a form from the database window and drop it onto the main form to add it as a subform.
    Move the subform to the position where you want it.
    Repeat the above steps for the other subform.

  10. The Following User Says Thank You to HansV For This Useful Post:

    DaMamboKing (2016-03-22)

  11. #10
    3 Star Lounger
    Join Date
    Mar 2009
    Location
    Hong Kong
    Posts
    359
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='786513' date='28-Jul-2009 19:28']Open the main form in design view.
    Arrange the database window and the form window so that you can see both.

    Drag a form from the database window and drop it onto the main form to add it as a subform.
    Move the subform to the position where you want it.
    Repeat the above steps for the other subform.[/quote]
    Wow, it's that simple. It works brilliantly. Thanks for your rapid rescue. It took me a week struggling for the solution in vain.
    Armstrong

Posting Permissions

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