linked list - Find Record Form - Include Related Records? -
i have following structure:
contact (id, txtcontact, txtnotes)
match (id, fkcontact, txtmatch, txtnotes)
contact match record (id, fkmatch, txtsomestuff, txtnotes)
i user starts new record assigning contact , match. have had add 2 tables structure, user can on record , link other contacts and/or other matches.
those tables follows:
select [id] ,[fkrecord] ,[fkcontact] [dbo].[tblmcontacts_relatedcontacts] select [id] ,[fkrecord] ,[fkmatch] [dbo].[tblmcontacts_relatedmatches]
now struggling update rowsource listbox, on form finding record. when user looks record, go form looks this:
this row source of list box, functions off user choosing option contact combo box, match combo box, or both.
select tblmcontacts.id, tblcontact.contactid, tblmatch.matchid, tblcontact.contactid [contact#], tblmatch.matchid [match#], tblcontacttype.txtcontacttype type, tblmcontactstatus.txtcontactstatus status, tbldoctype.txtdoctype [doc type], tbldmdocsmcontact.dtstart start, tbldmdocsmcontact.dtend [end] (((((tblcontact left join tblmatch on tblcontact.id = tblmatch.fkcontact) left join tblmcontacts on tblmatch.id = tblmcontacts.fkmatch) left join tblcontacttype on tblmcontacts.fkcontacttype = tblcontacttype.id) left join tbldmdocsmcontact on tblmcontacts.id = tbldmdocsmcontact.fkmc) left join tblmcontactstatus on tblmcontacts.fkmcontactstatus = tblmcontactstatus.id) left join tbldoctype on tbldmdocsmcontact.fkdoctype = tbldoctype.id (((tblmcontacts.id) not null) , ((tblcontact.contactid)=[forms]![frmmcontacts_findcontacts]![cbofiltercontact])) or (((tblmcontacts.id) not null) , ((tblmatch.matchid)=[forms]![frmmcontacts_findcontacts]![cbofiltermatch])) or (((tblmcontacts.id) not null) , ((tblcontact.contactid)=[forms]![frmmcontacts_findcontacts]![cbofiltercontact]) , ((tblmatch.matchid)=[forms]![frmmcontacts_findcontacts]![cbofiltermatch])) order tblcontact.contactid, tblmatch.matchid;
i figuring need union records not directly related contact or match, chosen. need list records in either of related tables, match contact or match id.
does make sense? tried give details, please let me know if i'm missing something.
i love how records show records in related tables, directly linked records.
thank you.
wiki
Comments
Post a Comment