Solved

Parent/Child data control for MS Access

Posted on 2009-06-30
6
578 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

867 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

21 Experts available now in Live!

Get 1:1 Help Now