How to edit query data

nschroeder

nschroeder
Local time
Today, 04:46
Joined
Jan 8, 2007
Messages
186
I have a table structure that I guess could be called a dual one-to-many-to-one, as can be seen in the attached Relationships screen print. Customer loan files are maintained in an AllFiles table, tied to the Customers and Loans tables through the CustomerFiles and LoanFiles tables. Users access the data from an unbound form called FileProcessing, where they can select a customer, and a loan for that customer. The files linked to that customer and loan then appear on a form called Files. However, I need the data on Files to be updateable, and I'm having a hard time coming up with a Files datasource that can be updated. The SQL that retrieves the needed data is:

Code:
SELECT AllFiles.*
FROM (AllFiles INNER JOIN CustomerFiles ON AllFiles.FileNum = CustomerFiles.FileNum)
 INNER JOIN LoanFiles ON AllFiles.FileNum = LoanFiles.FileNum
WHERE LoanFiles.LoanNum=[Forms]![FileProcessing]![tbLoanNum]
 AND CustomerFiles.CIFKey=[Forms]![FileProcessing]![tbLoanCIFKey];

I tried creating another query that just had the AllFiles table linked to the above query, but the data still couldn't be updated.

Any suggestions, please?
 

Attachments

  • Relationships.png
    Relationships.png
    24.4 KB · Views: 118
Unfortunately, your png has relationships to tables that are outside the bounds of your png. So we can see only some of your data model/relationships.

You may get more info here
 
I only included the tables relevant to the issue, so as not to confuse things.

Thanks for the link. I'd already read similar articles, and am aware that queries aren't updateable when they include one-to-many-to-one relationships (your link didn't include that issue). What I am asking is how do I bring the needed data into the form and have it updateable? Any suggestions would be appreciated.
 

Users who are viewing this thread

Back
Top Bottom