Solved

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

Posted on 2003-11-14
5
306 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
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.

867 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

17 Experts available now in Live!

Get 1:1 Help Now