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
Solved

Access 2000 subform displays data, but will not allow data input- unusual data tables

Posted on 2003-11-14
5
308 Views
Last Modified: 2008-03-04
I have two tables.  'tabDoc' is a list of documents.  'tabLinkParents' has three fields:  a key field, and two fields that lookup the foreign key for documents in 'tabDoc'.  The purpose is to keep track of parent-child relationships between the documents.

I have a form based on tabDoc with a subform based on tabLinkParents.  The subform is for inputting or displaying the parent documents.  'Link Child Field' is set to the key for the child document (a coincedence!) in tabLinkParents, and 'Link Master Field' is set to the document key in tabDoc.  That way, for each document in the database, the subform displays the parent documents.  

The subform displays data correctly when I add data to the tables directly, but when I try to add data using the subform, I get the following error message:  

The LinkMaster fields property setting has produced this error: 'the object doesn't contain the Automation object 'tabDoc.''

BTW, I can sucessfully add records to tabLinkParents using the query for the subform, so I know its not a problem with a non-updateable record source

Is there a  problem having simultaneous relations between two of the fields in tabLinkParents and the (single) primary key of tabDoc?

Suggestions for fixing the subform?

Thanks,
Brandon
0
Comment
Question by:hrufescens
  • 3
  • 2
5 Comments
 
LVL 32

Expert Comment

by:jadedata
ID: 9749354
Hey hrufescens!

  The relationship of the Form/Subform is reverse of the relationship of the actual data

  Parent       Child
  Form         Subform
  ChildDoc     ParentDoc

  This configuration is bound to be giving you difficultly if you are using the Master/Child links to control the view.

  Whats the chance of reversing the document displays so that the Parent doc is always the one on the main form?
regards
Jack
0
 

Author Comment

by:hrufescens
ID: 9749474
Jack,

Sorry, wouldn't make sense to reverse the displays.

Yes, the configuration gives me difficulty!  I think its set up right, though.  The form is for a given document.  The subform shows its parent documents.  In terms of Access, the parent is the form, and the child is the subform.  I'm with you.

My table 'tabLinkParents' has fields ID_LinkParents (an autonumber key field), ID_Parent, and ID_Child.  These latter two have relations with the same key field in tabDocs.  So my form is linked to the key field for tabDoc, and my subform is linked to ID_Child in tabLinkParents.  That way, for a given document (ID_Child), the subform will show all parents (ID_Parent).

I've done lots of other subforms in this db successfully. This one gives me the heartburn, though- is it because  the two fields in tabLinkParents are linked to the same key field in tabDoc?

Thanks,
Brandon
0
 
LVL 32

Accepted Solution

by:
jadedata earned 500 total points
ID: 9749507
The LinkMaster fields property setting has produced this error: 'the object doesn't contain the Automation object 'tabDoc.''

This tells me that the tabDoc object is not exposed to the subforms LinkMaster.  This should be the name of a field in the underlying table or query instead of a form or control name (although it will accept those)

Master/Child link properties MUST be between two DIRECTLY related objects.
0
 

Author Comment

by:hrufescens
ID: 9751289
Thanks jadedata,

Your comment didn't solve the problem, but that's not your fault.  You did force me to go back and look at what I was taking for granted.  Everything looked right in the Access user interface, but something was screwed behind the forms.  I just started the forms from scratch ("exactly" as before!) and they work.

Having two fields reated to the same field in a second table was not the problem. Gremlins were, I guess...

You get the points- thanks again for responding

Brandon
0
 
LVL 32

Expert Comment

by:jadedata
ID: 9751301
excellent work sir.  I own a copy of the gremblins shirt too!
thanx for the question!
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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

790 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