Printable Version of Topic

Click here to view this topic in its original format

UtterAccess Forums _ Access Tables + Relationships _ Northwind Students Extension - Referring To Table Twice

Posted by: dday76 Jun 13 2018, 08:25 PM

Context: Extension of the Northwind Students Database
Problem: Can't update the Guardian field on the Primary tab of the Member Details form (frmMemberDetails, subform is frmMDPrimary)
Likely error: qryRelationships

So I started the the Students database. I replaced Student objects with Member objects.
I also prefixed the new things tbl/qry/frm.
The original system had Students-S&G-Guardians. I have a new qryRelationships object that associates Members-Relationships-Members_1.

The idea is if I have two members, Jane and John Jones, I want to know they are associated.
If Jane is primary, I want to enter Jane in the Guardian field on the John's Member Detail form, on the Primary tab.

However, I guess the relationship I have set up won't allow for that. I get the dropdown but the field isn't editable.
Any advice on how to make this kind of recursive relationship work? I don't want to have to enter members on two forms.

Thanks.



 nw_students2.zip ( 283.6K ): 8
 

Posted by: mike60smart Jun 14 2018, 07:05 AM

Hi

If a Student can have 1 or More Guardians then the standard method of data entry is a Main Form for the Student and a Subform for the Guardians.

In the subform you would include a field to indicate whether or not they are Primary Guardian or Not.


Posted by: dday76 Jun 14 2018, 09:37 AM

I do have the subform and the field. The issue is I can't enter anything in the field.

Posted by: mike60smart Jun 14 2018, 09:42 AM

Hi

The subform should be bound to the Table and NOT your qryRelationships

Which Form are you unable to add a guardian??

Posted by: mike60smart Jun 14 2018, 10:05 AM

Hi

I am a little puzzled.

You say:-

"The idea is if I have two members, Jane and John Jones, I want to know they are associated.
If Jane is primary, I want to enter Jane in the Guardian field on the John's Member Detail form, on the Primary tab."

In this scenario you would have a Main Form based on the Primary Member with a subform to show any associated Members


Posted by: dday76 Jun 15 2018, 10:46 PM

I see what you're saying. I made it too difficult trying to do the query. I can point it back at tblRelationships.

It should pull based on the main form ID, then I can input the 'GuardianID' and other related info. I'll go with that. I'll try to keep it simple next time... It seems to be ok. Thanks.

Posted by: mike60smart Jun 16 2018, 04:14 AM

Hi

We were glad to help