Solved

Access 2007 Nested Tables

Posted on 2012-03-20
6
714 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

707 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

18 Experts available now in Live!

Get 1:1 Help Now