Solved

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

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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

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…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

744 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

10 Experts available now in Live!

Get 1:1 Help Now