Solved

Parent/Child data control for MS Access

Posted on 2009-06-30
6
581 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

737 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