Parent / child settings on a second subform?

  • Thread starter breg via AccessMonster.com
  • Start date
B

breg via AccessMonster.com

All,

I tried to solve this in December, but without success... I'm not a newbie,
but I'm not very good in db desgining as well, it's more like trail and error
:)...
Ok, so I'm creating a db where the history of submitted documents (which are
part of a project) can be traced. A document can be submitted more than once.

So in short, this is how it is:
1st level - General project information (displayed on tabpage1);
2nd level - Project related documents (displayed on tabpage2).
3rd level - Muliple revisions of the project related document (displayed on
tabpage3).

What I created is: tblProjects, tblDocuments and tblRevisions. On a first
subform, I managed to relate and display the applicable documents to a single
project. However, on a second subform I'm unable to relate the revisions to a
single document (which is diplayed on the first subform).

The properties look like this:
First subform, parent / child link: tblProjects(ProjectID) / tblDocuments
(DocumentsID) as 1:Many.
Second subform parent / child link: tblProjects(ProjectID) / tblRevisions
(DocumentsID) as 1:Many.

To my idea the second subform properties aree not correct as I think the
parent / child should be: tblDocuments (DocumentsID) / tblRevisions
(DocumentsID).

Can anyone help me out? Or does anyone have a good example of how this is
normally done?
If i'm unclear please let me know, and I'll try to clarify it more.

Regards,
Arjan
 
S

Stefan Hoffmann

hi Arjan,

So in short, this is how it is:
1st level - General project information (displayed on tabpage1);
2nd level - Project related documents (displayed on tabpage2).
3rd level - Muliple revisions of the project related document (displayed on
tabpage3).
A hierarchy displayed on spanned over different tabs is diffcult to
visualize. I would not do that.

The master is on your main form?
Can anyone help me out? Or does anyone have a good example of how this is
normally done?
If you really want it, than you have to modify the queries for the pages
2 and 3 such that they contain a condition using a form reference -
Forms("Mainform").Form.SubformControlName.Form![fieldName] - to filter
the values, don't use linked master/child fields.


mfG
--> stefan <--
 
D

Daryl S

Arjan -

Yes, you need to change the relationships so that the tblRevisions is
related to the tblDocuments through the DocumentID.

Then, instead of using tabs to display these, use subforms. Your main form
(Projects) should have a subform on it for the Projects, and the Projects
form should have a subform for the Revisions, linked parent/child.
 
J

jim

Daryl, I've been trying to do this very thing with continuous forms. I have
a main form based on tblCustomer and 2 subforms(continuous forms) which is
working very well. I would like to put another continuous subform on one of
the subforms -is it possible? I read that if you put a continuous subform
on a continuous subform that the first subform must be in the header or
footer but access won't let me do it.
TIA
 
D

Daryl S

Jim -

It is the second subform that must be put in the header/footer of the first
subform to make the continuous subforms work. I think you get a warning
message or something from Access, but you can continue through and it will
work.
 
B

breg via AccessMonster.com

Stefan,

I've all my subforms on the tabcontrol. However, I understand that this is
not wise to do, So i'm deleting the tabcontrol and with buttons i'll will
open a subform which open the diffrent subforms in a option group..

Thanks for helping!

Arjan

Stefan said:
hi Arjan,
So in short, this is how it is:
1st level - General project information (displayed on tabpage1);
2nd level - Project related documents (displayed on tabpage2).
3rd level - Muliple revisions of the project related document (displayed on
tabpage3).
A hierarchy displayed on spanned over different tabs is diffcult to
visualize. I would not do that.

The master is on your main form?
Can anyone help me out? Or does anyone have a good example of how this is
normally done?
If you really want it, than you have to modify the queries for the pages
2 and 3 such that they contain a condition using a form reference -
Forms("Mainform").Form.SubformControlName.Form![fieldName] - to filter
the values, don't use linked master/child fields.

mfG
--> stefan <--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top