Solved

Access 2007 Nested Tables

Posted on 2012-03-20
6
731 Views
Last Modified: 2012-03-27
I have to develop a database on a system where my development options are pretty restricted.  I have Access 2007 as my database so decided to use Access Forms for the GUI.

I believe my only other option is a .Net Winform.

This needs to be multi-user so I know I need to separate the GUI from the database.

The problem is, I didn't develop the GUI with linked tables thinking everything is basically 'the same'.

The form I developed includes a datasheet table object.  It has a nested table and provides the '+' to expand to add/edit/delete child records.

I've attached a simple parent/child database to demonstrate this if I've used the wrong terminology.  If you open the Parent table in datasheet view, you can expand to see the child rows.

Once you create a new database and link to the parent, you can no longer expand.

I didn't realize that I would lose this functionality when I moved to a linked table.

I'm hoping there is a work-around to this without migrating to continuous forms.  I would like to keep datasheet so I don't have to rework a lot of the app.
junk.accdb
0
Comment
[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
  • 4
6 Comments
 
LVL 57
ID: 37743730
<<This needs to be multi-user so I know I need to separate the GUI from the database.>>

 Just a forewarning; Access is a poor choice for n-tier development, because basically, you can't to it.

<<I've attached a simple parent/child database to demonstrate this if I've used the wrong terminology.  If you open the Parent table in datasheet view, you can expand to see the child rows.>>

  This is called the sub-datasheet feature and usually with an Access app, you turn it off because it's a performance hog.

<<I'm hoping there is a work-around to this without migrating to continuous forms.  I would like to keep datasheet so I don't have to rework a lot of the app.>>

  There are probably some 3rd party grid controls that would allow you to do this, but with native Access controls, a main /subform cobination is it, which was design to directly express the parent / child relationship.

 You can BTW put a form in datasheet view within a main form, but I don't know if it retains the subdatasheet feature as I've never tried it.  Datasheets in the past have been limited in what you could do with them, lacking a number of events that a normal form would have.

  A tree view control would come close, but it's really not designed to deal with whole records.

Jim.
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 37743756
I found an example of a master/detail continuous form that might give you a head start if you decide to pursue that path.

http://www.blueclaw-db.com/download/master-detail_continuous_forms.htm
0
 
LVL 77

Author Comment

by:slightwv (䄆 Netminder)
ID: 37743806
>>Access is a poor choice for n-tier development

Preaching to the choir.  Trust me, I know this.  But design time sure beats .Net Winforms...

>>This is called the sub-datasheet feature

Thanks for the name!

>>put a form in datasheet view within a main form, but I don't know if it retains the subdatasheet feature as I've never tried it

You can.  That is what I ended up doing.  The design basically has a parent, child, grandchild relationship.  The main form shows a single parent record.  Then I used the datasheet to show the many children and many grandchildren.

I didn't like how continous forms pulled this off.  I found the work-around mentioned above where you placed the sub form in the page footer and as you moved through the child, the grandchild form would refresh.

It made a VERY ugly form.
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 77

Author Comment

by:slightwv (䄆 Netminder)
ID: 37743944
Here is a more realistic example of what I'm doing.  With attached database and form.

The parent record is displayed in the form.  It can have many child records and each child can have many children.

The sub-datasheet doesn't make the prettiest GUI but it is better than any alternative I have stumbled across.
junk.accdb
0
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 0 total points
ID: 37752463
There is a work around.  Our Sys Admin bleeds Microsoft and came up with something so simple:

Create queries on the linked tables.  Then you can manually add a subdatasheet from the Records section of the Ribbon.  It is under More.

Attached are the two sample databases with forms that demonstrate this.
junk.accdb
junk-link.accdb
0
 
LVL 77

Author Closing Comment

by:slightwv (䄆 Netminder)
ID: 37770376
Queries solved the issue
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

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

710 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