Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access 2007 Nested Tables

Posted on 2012-03-20
6
Medium Priority
?
743 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 58
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 78

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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 78

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 78

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 78

Author Closing Comment

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

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

885 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