Results 1 to 10 of 10
  1. #1
    lawman is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2020
    Posts
    4

    Vertical Master Detail with left/right layout.

    I'm trying to create a form with following layout.

    1. Left vertical column with Tasks datasheet form, showing columns Task, Case, Date, Status
    2. Right column with Full details of the Case in currently selected Task row.
    3. The above 2 forms are therefore linked by Case PK/FK.
    4. This would look almost like ms-outlook, where you have a list of messages on your left and depending on which you select, further contents of that message show on the right.

    Can somebody please guide me on how to best do this.

    I've tried guides but find:

    a. They always have master/detail horizontally above/below the other instead of left/right. Can't seem to place this when I try.
    b. If I create Tasks subform into Case mainform, this only shows me tasks for that single Case. I don't want to see all Tasks for all Cases, as thats the main form.
    c. If I create a Case subform into a Tasks mainform, this results in only showing a tasks form which now has an expandable row option via + symbol, that lets me see the case details on expansion. This isn't what I want.
    d. I want to be able to scroll up and down the left tasks data sheet list, and the right part of my screen auto changes the case to that in current task selected, with full details about that case.

    Hope the above makes sense.

    Complete newbie as is obvious from the question, so pls keep it in layman terms.



    Thanks in advance.

  2. #2
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,425
    Have never tried, but it sounds like you'd need a form with 2 subforms. You cannot do this with one main and one subform. If you search you will find many results for how to link 2 subforms together. There is also something called a Tree View control but I think you will find it a bit daunting to control. It is also an ActiveX control (IIRC) which can be problematic in terms of supporting over different pc's and/or OS versions. Plus M$ sometimes discontinues support for ActiveX controls.
    Last edited by Micron; 12-13-2020 at 06:50 PM. Reason: added info
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,941
    Sounds like micron's suggestion of two subforms is the way to go.

    on the main form have a hidden textbox control called say txtLink

    in the left subform current event put something like


    parent.txtLink=me.ID


    for your right subform control use the linkchild/master properties to set the master to txtLink and child to the relevant field in the subform

  4. #4
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,165

  5. #5
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,822
    Hi
    I use this method all the time. 1 Unbound Form and then the 2 subforms side by side.

    To link the forms use the standard method of an Unbound Control :- =[Forms]![NameofMainUnboundForm]![NameofLeftSubform].[Form]![NameofPrimaryKeyID]

    You then name this unbound Control:- txtPrimarkKeyID

    Then in the Properties of the Right Hand Form LinkMaster = txtPrimarkKeyID and LinkChild =ForeignKeyID

  6. #6
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,158
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  7. #7
    lawman is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2020
    Posts
    4
    Quote Originally Posted by mike60smart View Post
    Hi
    I use this method all the time. 1 Unbound Form and then the 2 subforms side by side.

    To link the forms use the standard method of an Unbound Control :- =[Forms]![NameofMainUnboundForm]![NameofLeftSubform].[Form]![NameofPrimaryKeyID]

    You then name this unbound Control:- txtPrimarkKeyID

    Then in the Properties of the Right Hand Form LinkMaster = txtPrimarkKeyID and LinkChild =ForeignKeyID
    I can manage to do above.

    However, the problem is how to reference hidden bound column 1 of a combobox in LeftSubForm. I can only manage to reference the visible data in LeftSubform combobox.

    ie. =[frmKeydates].[LeftSubForm]![ComboboxControl]

    How do I reference hidden bound column 1 of ComboBoxControl instead of the visible column 2.

  8. #8
    lawman is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2020
    Posts
    4
    Quote Originally Posted by Minty View Post
    Are these not 2 separate sites with different postings and users?

    Didn't realise we should only use one site?

  9. #9
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I would say it is acceptable to cross post *IF* you put a notice in both/all cross posts as to where you have also posted your question.
    See Cross posting Etiquette

  10. #10
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,822
    you can reference the first hidden bound column 1 of a combobox using a standard form reference
    ie =[Comboboxname].Column(0)

    Then use this in your Textbox link to the other subform

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

Similar Threads

  1. Master and Detail Split Form View
    By james28 in forum Forms
    Replies: 23
    Last Post: 07-30-2014, 02:19 AM
  2. Master\Detail Only Show Last Detail Record
    By jamies in forum Queries
    Replies: 2
    Last Post: 04-14-2014, 01:25 PM
  3. Increase Vertical size of detail section
    By Arsalan in forum Forms
    Replies: 2
    Last Post: 01-22-2013, 01:20 AM
  4. Master/detail form problem....
    By dkperez in forum Forms
    Replies: 5
    Last Post: 04-01-2011, 04:28 PM
  5. How to code master detail relation in tabforms
    By AshokS in forum Programming
    Replies: 18
    Last Post: 12-20-2010, 08:15 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