solun
Programmer
- Apr 1, 1999
- 55
I went to test my big project with a user yesterday and everything was broke!!
Okay, not everything, just the ability to link several tables by one ID and add data...which is pretty darn crucial.
Table 1: Loans
Table 2: LoansMortgages
Table 3: LoansRealEstateMortgages
Table 4: LoansREMtgCollMtg
Tbale 5: LoansTruthinLending
Tables 2-5 have one-to-one relationships with table 1.
I put them all together in a query together to be able to read/write data with a form. I used Join2 ( The form is definitely not the problem.
The query should allow me to add and edit data to each of the tables, right? for tables 3, 4, & 5 I get the error "You cannot add or change a record because a related record is required the table "Loans"." but not for table 2.
Of course, loans already has a related record.
So, what's going on???
I've checked the field definitions for LoanID on each table. they're identical. I ran documenter for each of these tables and there are only one point of difference between Table 2 and Tables 3-5: Under Table Indexes, Loan ID, Unique is "True" for Table 2, "False" for 3-5. I don't know how to change that or if it's actually the problem.
(I've also done the usual MS Access tricks of Compact & Repair, create new db & import all the parts, rewrote the query, etc.)
Thank you!!!
Heidi I. Jones
Ridgerunner Consulting
Questions Answered. Problems Solved.
Okay, not everything, just the ability to link several tables by one ID and add data...which is pretty darn crucial.
Table 1: Loans
Table 2: LoansMortgages
Table 3: LoansRealEstateMortgages
Table 4: LoansREMtgCollMtg
Tbale 5: LoansTruthinLending
Tables 2-5 have one-to-one relationships with table 1.
I put them all together in a query together to be able to read/write data with a form. I used Join2 ( The form is definitely not the problem.
The query should allow me to add and edit data to each of the tables, right? for tables 3, 4, & 5 I get the error "You cannot add or change a record because a related record is required the table "Loans"." but not for table 2.
Of course, loans already has a related record.
Code:
SELECT Loans.LoanID, Loans.AuditID, Loans.osiCustomerName, Loans.osiLoanNumber, Loans.osiDateLoanClose, Loans.osiAmt, Loans.osiRate, Loans.osiTerm, Loans.osiLoanTypeID, Loans.CreditReport, Loans.CreditReportDate, Loans.CreditReportScore, Loans.CreditReportY1, Loans.CreditReportY2, Loans.Note, Loans.NoteAmt, Loans.NoteRate, Loans.NoteTerm, Loans.NoteOfficer, Loans.NoteCosign, Loans.NoteTypeID, Loans.VoluntaryDeductionForm, Loans.LifeIns, Loans.LifeInsSigned, Loans.AHIns, Loans.AHInsSigned, Loans.RateToPolicy, Loans.RateToPolicyShould, Loans.LoanNotes, Loans.Finished, LoansMortgage.Mortgage, LoansMortgage.MtgType, LoansMortgage.MtgAmt, LoansMortgage.MtgRecord, LoansMortgage.LTV, LoansMortgage.LTVtoPolicy, LoansMortgage.Rescission, LoansMortgage.RescissionType, LoansMortgage.RescissionSign, LoansMortgage.RescissionStartDate, LoansMortgage.RescissionEndDate, sysLoanTypes.LoanType, LoansTruthInLending.TILDiscl, LoansTruthInLending.TILDisclSign, LoansTruthInLending.TILDisclDate, LoansTruthInLending.TILAPR, LoansTruthInLending.TILAPRCorrect, LoansTruthInLending.TILFinChg, LoansTruthInLending.TILFinChgCorrect, LoansTruthInLending.TILTotalPay, LoansTruthInLending.TILTotalPayCorrect
FROM ((sysLoanTypes INNER JOIN Loans ON sysLoanTypes.LoanTypeID = Loans.osiLoanTypeID) LEFT JOIN LoansTruthInLending ON Loans.LoanID = LoansTruthInLending.LoanID) LEFT JOIN LoansMortgage ON Loans.LoanID = LoansMortgage.LoanID
WHERE (((Loans.osiLoanTypeID)=1));
So, what's going on???
I've checked the field definitions for LoanID on each table. they're identical. I ran documenter for each of these tables and there are only one point of difference between Table 2 and Tables 3-5: Under Table Indexes, Loan ID, Unique is "True" for Table 2, "False" for 3-5. I don't know how to change that or if it's actually the problem.
(I've also done the usual MS Access tricks of Compact & Repair, create new db & import all the parts, rewrote the query, etc.)
Thank you!!!
Heidi I. Jones
Ridgerunner Consulting
Questions Answered. Problems Solved.