Solved

Access 2007 Nested Tables

Posted on 2012-03-20
6
717 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
  • 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 73

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 76

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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 76

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 76

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 76

Author Closing Comment

by:slightwv (䄆 Netminder)
ID: 37770376
Queries solved the issue
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

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
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.
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…

919 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

13 Experts available now in Live!

Get 1:1 Help Now