Solved

Parent/Child data control for MS Access

Posted on 2009-06-30
6
577 Views
Last Modified: 2013-11-28
I need to have a control that will allow the parent records to be listed, with a plus sign (+) to the left of the control. When clicked, the child records will be displayed under the parent record

i.e.
       Heading1   Heading2      Heading3   Heading4       Heading5 ...
---------------------------------------------------------------------------------
(+)  Parent1      SomeData     MoreData   MaybeAdate MoreData Etc
(+)  Parent2      SomeData     MoreData   MaybeAdate MoreData Etc
(+)  Parent3      SomeData     MoreData   MaybeAdate MoreData Etc
(+)  Parent4      SomeData     MoreData   MaybeAdate MoreData Etc

Note: I need individual editable fields, not a string of characters as in the Tree control

When I click on the '+' next the Parent3, the following is displayed:

(+)  Parent1      SomeData     MoreData   MaybeAdate MoreData Etc
(-)  Parent2      SomeData     MoreData   MaybeAdate MoreData Etc
       SubHead1  SubHead2   SubHead3    SubHead4 ...
      -------------------------------------------------------------
       ChildDta1    MoreData    MoreData      MorData
       ChildDta2    MoreData    MoreData      MorData
       ChildDta3    MoreData    MoreData      MorData
       ChildDta4    MoreData    MoreData      MorData
(+)  Parent3      SomeData     MoreData   MaybeAdate MoreData Etc
(+)  Parent4      SomeData     MoreData   MaybeAdate MoreData Etc

I don't care about the layout, but these fields need to be discrete and editable.

When a table is in datasheet mode, it acts this way. How can I do this in a form?

This is a commercial project, so if I need to purchase a control, that's OK.

Thanks!
Data-Grid-Example.gif
0
Comment
Question by:charos
  • 3
  • 2
6 Comments
 
LVL 42

Accepted Solution

by:
dqmq earned 75 total points
ID: 24747887
The simple way is use a subform control and set the default view of the form it contains to a datasheet.
0
 

Author Comment

by:charos
ID: 24748567
There is a Boolean field on in the record set that I need to front-end with a push button. As such, the datasheet is a sub-optimal solution.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 24752939
Your reply to dqmq is difficult to understand.

<There is a Boolean field on in the record set >
1. You made no mention of any "Boolean" field in your original question.

2. <that I need to front-end with a push button. >
I have no idea what this means.

3. <As such, the datasheet is a sub-optimal solution.>
Then can you please post a graphical example of *exactly* what you need?

My guess is that you need a "List View" or "Tree View" control.

JeffCoachman
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:charos
ID: 24754788
Thanks for the follow up questions. Attached please find a mock up of the form I would like to create.

The 'push-button' is associated with a Yes/No type field (i.e. Boolean).

<<
My guess is that you need a "List View" or "Tree View" control.
>>
It would be great if there was a pre-existing control for this!

Thanks!

- BIll
Control-Mockup.gif
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 50 total points
ID: 24760136
There is no control that I know of that will display related data in this fashion.

In response to DQMs suggestion:
  <use a subform control and set the default view of the form it contains to a datasheet.>
You stated:
<There is a Boolean field on in the record set that I need to front-end with a push button. As such, the datasheet is a sub-optimal solution.>
Then don't use a button, use a checknbox?
A check box could be made to do the exact same thing. "Hence" a datasheet suform would work quite nicely.
;-)

JeffCoachman
0
 

Author Closing Comment

by:charos
ID: 31598451
Thank you for the information. The information about the form control not being available was almost as important as the final answer, which was answered immediately and correctly. Thanks for your expertise.

- Bill Carpenter
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now