Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2003-11-14
5
Medium Priority
?
316 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
[X]
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
  • 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 1500 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

604 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