Non updateable queries

leahb747

Registered User.
Local time
Today, 09:20
Joined
Jun 12, 2012
Messages
30
So I posted this in another thread because I thought something was wrong with my form. I've worked out it's actually my queries.

I have a query called qryCurrent Resources that lists all of the resources and their IDs from each Contractor. The SQL Code is as follows.

SELECT tblResources.ResourceID, tblResources.ResourceDesc, tblRates.Code, tblRates.CodeDesc, tblRates.Unit, tblContracts.Contract, tblResourceAllocations.ResourceStart, tblResourceAllocations.ResourceFinish
FROM tblRates INNER JOIN (tblResources INNER JOIN (tblContracts INNER JOIN tblResourceAllocations ON tblContracts.Contract=tblResourceAllocations.Contract) ON tblResources.ResourceID=tblResourceAllocations.ResourceID) ON tblRates.Contract=tblResourceAllocations.Contract;

I cannot update anything in the Datasheet View of this query at all.

Then, I have another query - qrepRates, that uses the aforementioned query to show the rates allocated to each resource for each company. SQL is as follows

SELECT tblRates.Contract, tblRates.Rev, tblContracts.ContractDesc, tblContracts.Contractor, tblContracts.Representative, tblContracts.AwardDate, tblContracts.Closed, tblRates.Code, tblRates.CodeDesc, tblRates.Unit, tblRates.OperatingRate, tblRates.StandbyRate, tblRates.BreakdownRate, tblRates.Plant, tblRates.RateStart, tblRates.RateFinish, qryCurrentResouces.ResourceID, qryCurrentResouces.ResourceDesc
FROM (tblContracts INNER JOIN tblRates ON tblContracts.Contract = tblRates.Contract) INNER JOIN qryCurrentResouces ON tblRates.Contract = qryCurrentResouces.Contract;

This too is non updateable.

I'm not sure what the problem is, is it that there is more than 3 tables in the query? if so any recommendations to make it work?

TIA
 
When you have more than two tables in a query, they must form a hierarchy such as Customer-->Orders-->OrderDetails. I'm going to guess that you have independent 1-m relationships and that is causing a Cartesian Product which is not updateable. Please explain the three tables and their relationships in terms similar to:
A customer may have many orders and an order may have many details.
 

Users who are viewing this thread

Back
Top Bottom