Cannot modify record based on multiple table query

A

Alain

Hi,

I am trying to create a query that uses 13 different tables to be a
recordsource for a form. When the query runs , I can see all the data but
cannot create a new recordset

I use the following:
SELECT Branch.IdBranch, Branch.BranchNo, Branch.Branch,
tblImprovementsNotes.Improvements, tblLeaseHistoryNotes.LeaseHistory,
tblMaintenanceNotes.Maintenance, tblSubletAssignNotes.SubletAssign,
tblIncentivesNotes.Incentives, tblSignageNotes.Signage, tblNotes.Notes,
tblSecurDepot.SecurDepot, tblSecurDepot.PaidAmt, tblSecurDepot.PaidDate,
tblSecurDepot.ReclaimAmt, tblSecurDepot.ReclaimDate, tblFlagNotes.Flag,
Branch.LastUpd, Branch.LastUpdUser, Branch.CreatedBy, Branch.CreatedDate
FROM (((((tblLeaseHistoryNotes INNER JOIN tblSecurDepot ON
tblLeaseHistoryNotes.IdBranch = tblSecurDepot.IdBranch) INNER JOIN
tblIncentivesNotes ON tblSecurDepot.IdBranch = tblIncentivesNotes.IdBranch)
INNER JOIN tblMaintenanceNotes ON tblIncentivesNotes.IdBranch =
tblMaintenanceNotes.IdBranch) INNER JOIN tblSignageNotes ON
tblMaintenanceNotes.IdBranch = tblSignageNotes.IdBranch) INNER JOIN
tblFlagNotes ON tblSignageNotes.IdBranch = tblFlagNotes.IdBranch) INNER JOIN
(Branch INNER JOIN ((tblSubletAssignNotes INNER JOIN tblNotes ON
tblSubletAssignNotes.IdBranch = tblNotes.IdBranch) INNER JOIN
tblImprovementsNotes ON tblNotes.IdBranch = tblImprovementsNotes.IdBranch) ON
Branch.IdBranch = tblSubletAssignNotes.IdBranch) ON
tblLeaseHistoryNotes.IdBranch = tblImprovementsNotes.IdBranch
ORDER BY Branch.IdBranch DESC;

If I relate all my tables to my main one "Branch", unless I have a recordset
with the same PK, it will not let me add or modify data

Can anyone give me a pointer on this one

Thanks
 
D

Duane Hookom

I can't imagine a form with a record source consisting of more than a few
tables. 13 is difficult to visualize. Why aren't you using subforms for
editing the "detail/child" records?
 
A

Alain

Duane,

that was my first solution but I was hoping I could get the same end results
thu a query instead of building 12 subforms

Thanks
 
D

Duane Hookom

Your query would need to have all joins on primary and foreign key fields. I
would rather have an interface with subforms.
 

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