Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Parent/Child data control for MS Access

Posted on 2009-06-30
6
Medium Priority
?
586 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 300 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 

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 200 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

618 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